diff --git a/Cargo.toml b/Cargo.toml index 7b9ca1d63..33a96be44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ path = "src/lib.rs" [dependencies] bitflags = "0.1" -lazy_static = "0.1" +lazy_static = "1.4" rustc-serialize = { optional = true, version = "0.3" } serde = { optional = true, version = "1.0" } serde_derive = { optional = true, version = "1.0" } diff --git a/examples/samples.rs b/examples/samples.rs index 4eca678d5..bc21ac095 100644 --- a/examples/samples.rs +++ b/examples/samples.rs @@ -546,7 +546,7 @@ impl Render for NoiseSample { if let Some((_, Event::Key(key))) = event { match key.printable { - '1'...'9' => + '1'..='9' => self.func = { let number = key.printable.to_digit(10).unwrap() as u8; NoiseFunction::from_value(number - 1) @@ -778,7 +778,7 @@ struct PathSample<'a> { } const TORCH_RADIUS : f32 = 10.0; -const SQUARED_TORCH_RADIUS : f32 = (TORCH_RADIUS*TORCH_RADIUS); +const SQUARED_TORCH_RADIUS : f32 = TORCH_RADIUS*TORCH_RADIUS; static SMAP : [&'static str; 20] = [ "##############################################", diff --git a/src/bindings.rs b/src/bindings.rs index 91ed614bf..0bb081159 100644 --- a/src/bindings.rs +++ b/src/bindings.rs @@ -40,7 +40,7 @@ impl + ?Sized> AsNative for Box { pub fn keycode_from_native(input: self::ffi::TCOD_keycode_t) -> Option { match input as u32 { - x @ 0 ... 66 => Some(unsafe { transmute(x) }), + x @ 0 ..= 66 => Some(unsafe { transmute(x) }), _ => None } } diff --git a/src/pathfinding.rs b/src/pathfinding.rs index fb139f207..ab352256d 100644 --- a/src/pathfinding.rs +++ b/src/pathfinding.rs @@ -148,7 +148,7 @@ impl<'a> AStar<'a> { let mut x: c_int = 0; let mut y: c_int = 0; ffi::TCOD_path_get(self.tcod_path, index, &mut x, &mut y); - (Some((x, y))) + Some((x, y)) } }