Skip to content

Commit

Permalink
Cleaned up build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ojhp committed Jan 25, 2021
1 parent a6c3051 commit 7323243
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions examples/samples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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] = [
"##############################################",
Expand Down
2 changes: 1 addition & 1 deletion src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl <T, U: AsNative<T> + ?Sized> AsNative<T> for Box<U> {

pub fn keycode_from_native(input: self::ffi::TCOD_keycode_t) -> Option<KeyCode> {
match input as u32 {
x @ 0 ... 66 => Some(unsafe { transmute(x) }),
x @ 0 ..= 66 => Some(unsafe { transmute(x) }),
_ => None
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/pathfinding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down

0 comments on commit 7323243

Please sign in to comment.