Skip to content

Commit

Permalink
Merge pull request #96 from tomassedovic/silence-warns-new-release
Browse files Browse the repository at this point in the history
Update examples to latest rust
  • Loading branch information
tomassedovic committed Feb 6, 2015
2 parents f0afb96 + b0c0048 commit 514372b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tcod"
description = "The Rust bindings for the Doryen library (a.k.a. libtcod)."
version = "0.4.6"
version = "0.4.7"
homepage = "https://github.com/tomassedovic/tcod-rs"
repository = "https://github.com/tomassedovic/tcod-rs"
readme = "README.md"
Expand All @@ -25,7 +25,10 @@ bitflags = "0.1"

[dependencies.tcod-sys]
path = "tcod-sys"
version = "2.0.3"
version = "2.0.4"

[dev-dependencies]
rand = "0.1.2"

# TODO: temporarily disabling debuginfo until this is fixed:
# https://github.com/rust-lang/rust/issues/17257
Expand Down
4 changes: 3 additions & 1 deletion examples/astar-path-finding.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![feature(core)]

extern crate tcod;

use tcod::AStarPath;
Expand All @@ -14,7 +16,7 @@ fn create_path() -> AStarPath<'static> {
[0, 1, 0, 1, 0, 1, 0, 1],
];
// Movement like in Checkers: you can only move to the square of the same colour
let can_move = move |&mut: from: (i32, i32), to: (i32, i32)| -> f32 {
let can_move = move |from: (i32, i32), to: (i32, i32)| -> f32 {
let (fx, fy) = from;
let (tx, ty) = to;
if chess_board[fy as usize][fx as usize] == chess_board[ty as usize][tx as usize] {
Expand Down
4 changes: 3 additions & 1 deletion examples/dijkstra-path-finding.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![feature(core)]

extern crate tcod;

use tcod::DijkstraPath;
Expand All @@ -14,7 +16,7 @@ fn create_path() -> DijkstraPath<'static> {
[0, 1, 0, 1, 0, 1, 0, 1],
];
// Movement like in Checkers: you can only move to the square of the same colour
let can_move = move |&mut: from: (i32, i32), to: (i32, i32)| -> f32 {
let can_move = move |from: (i32, i32), to: (i32, i32)| -> f32 {
let (fx, fy) = from;
let (tx, ty) = to;
if chess_board[fy as usize][fx as usize] == chess_board[ty as usize][tx as usize] {
Expand Down
5 changes: 2 additions & 3 deletions examples/fov.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#![feature(rand)]
#![feature(core)]

extern crate rand;
extern crate tcod;

use std::rand;

use tcod::{Console, BackgroundFlag, FovAlgorithm, Map};

// We'll use a basic structure to define our tiles.
Expand Down
2 changes: 1 addition & 1 deletion tcod-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tcod-sys"
description = "Raw FFI bindings & build script to link against libtcod."
version = "2.0.3"
version = "2.0.4"
license = "WTFPL"
homepage = "https://github.com/tomassedovic/tcod-rs"
repository = "https://github.com/tomassedovic/tcod-rs/tree/master/tcod-sys"
Expand Down

0 comments on commit 514372b

Please sign in to comment.