From 2adae4f9fde989c0f497ed5916182890e29458d4 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 15 Dec 2014 11:19:43 -0500 Subject: [PATCH] Enum scoping fixes. --- src/azure_hl.rs | 8 ++++---- src/scaled_font.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/azure_hl.rs b/src/azure_hl.rs index 9e26647..8e8517e 100644 --- a/src/azure_hl.rs +++ b/src/azure_hl.rs @@ -1068,7 +1068,7 @@ pub enum GaussianBlurAttribute { impl FilterAttribute for FloodAttribute { fn set(&self, filter_node: &FilterNode) { - let ColorFloodAttribute(value) = *self; + let FloodAttribute::ColorFloodAttribute(value) = *self; unsafe { AzFilterNodeSetColorAttribute(filter_node.azure_filter_node, AZ_ATT_FLOOD_COLOR, @@ -1079,7 +1079,7 @@ impl FilterAttribute for FloodAttribute { impl FilterAttribute for GaussianBlurAttribute { fn set(&self, filter_node: &FilterNode) { - let StdDeviationGaussianBlurAttribute(value) = *self; + let GaussianBlurAttribute::StdDeviationGaussianBlurAttribute(value) = *self; unsafe { AzFilterNodeSetFloatAttribute(filter_node.azure_filter_node, AZ_ATT_GAUSSIAN_BLUR_STD_DEVIATION, @@ -1096,8 +1096,8 @@ pub enum FilterType { impl FilterType { pub fn as_azure_filter_type(self) -> AzFilterType { match self { - FloodFilterType => AZ_FILTER_TYPE_FLOOD, - GaussianBlurFilterType => AZ_FILTER_TYPE_GAUSSIAN_BLUR, + FilterType::FloodFilterType => AZ_FILTER_TYPE_FLOOD, + FilterType::GaussianBlurFilterType => AZ_FILTER_TYPE_GAUSSIAN_BLUR, } } } diff --git a/src/scaled_font.rs b/src/scaled_font.rs index 97ce3af..d228a83 100644 --- a/src/scaled_font.rs +++ b/src/scaled_font.rs @@ -110,7 +110,7 @@ impl ScaledFont { #[cfg(target_os="macos")] pub fn new(backend: BackendType, native_font: &CGFont, size: AzFloat) -> ScaledFont { use azure::AZ_NATIVE_FONT_MAC_FONT_FACE; - use azure_hl::{CoreGraphicsBackend,CoreGraphicsAcceleratedBackend}; + use azure_hl::BackendType::{CoreGraphicsBackend,CoreGraphicsAcceleratedBackend}; use core_foundation::base::TCFType; let mut azure_native_font = struct__AzNativeFont {