From 7b5f2790044da0786861d206879f523ee15f86a8 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Wed, 5 Nov 2014 13:49:21 -0800 Subject: [PATCH] Updates for rustc. --- src/azure_hl.rs | 12 ++++++------ src/scaled_font.rs | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/azure_hl.rs b/src/azure_hl.rs index 101b647..23e4571 100644 --- a/src/azure_hl.rs +++ b/src/azure_hl.rs @@ -174,7 +174,7 @@ impl StrokeOptions { StrokeOptions { line_width: line_width, miter_limit: miter_limit, - mDashPattern: ptr::mut_null(), + mDashPattern: ptr::null_mut(), mDashLength: 0, fields: AZ_CAP_BUTT as u8 << 4 | AZ_JOIN_MITER_OR_BEVEL as u8 } @@ -259,7 +259,7 @@ impl SurfaceFormat { 1 => B8G8R8X8, 2 => R5G6B5, 3 => A8, - _ => fail!("SurfaceFormat::new(): unknown Azure surface format") + _ => panic!("SurfaceFormat::new(): unknown Azure surface format") } } } @@ -354,7 +354,7 @@ impl DrawTarget { format.as_azure_surface_format()) }; if azure_draw_target.is_null() { - fail!("null azure draw target"); + panic!("null azure draw target"); } DrawTarget { azure_draw_target: azure_draw_target, @@ -378,7 +378,7 @@ impl DrawTarget { format.as_azure_surface_format()) }; if azure_draw_target.is_null() { - fail!("null azure draw target"); + panic!("null azure draw target"); } DrawTarget { azure_draw_target: azure_draw_target, @@ -403,7 +403,7 @@ impl DrawTarget { format.as_azure_surface_format()) }; if azure_draw_target.is_null() { - fail!("null azure draw target"); + panic!("null azure draw target"); } DrawTarget { azure_draw_target: azure_draw_target, @@ -489,7 +489,7 @@ impl DrawTarget { draw_options.as_azure_draw_options() }); let draw_options = match draw_options { - None => ptr::mut_null(), + None => ptr::null_mut(), Some(ref mut draw_options) => draw_options as *mut AzDrawOptions }; unsafe { diff --git a/src/scaled_font.rs b/src/scaled_font.rs index d47ce7e..5bfa2ef 100644 --- a/src/scaled_font.rs +++ b/src/scaled_font.rs @@ -72,7 +72,7 @@ impl ScaledFont { let mut azure_native_font = struct__AzNativeFont { mType: 0, - mFont: ptr::mut_null() + mFont: ptr::null_mut() }; match backend { @@ -96,7 +96,7 @@ impl ScaledFont { ScaledFont { azure_scaled_font: azure_scaled_font } } } - _ => { fail!("don't know how to make a scaled font for this backend"); } + _ => { panic!("don't know how to make a scaled font for this backend"); } } } @@ -109,7 +109,7 @@ impl ScaledFont { let mut azure_native_font = struct__AzNativeFont { mType: 0, - mFont: ptr::mut_null() + mFont: ptr::null_mut() }; match backend { @@ -120,7 +120,7 @@ impl ScaledFont { } } _ => { - fail!("don't know how to make a scaled font for this backend"); + panic!("don't know how to make a scaled font for this backend"); } }