Skip to content

Commit

Permalink
fix(examples): AtomicUint is deprecated in favor of AtomicUsize
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Gutierrez S <rgs@itevenworks.net>
  • Loading branch information
rgs1 committed Feb 13, 2015
1 parent f0d1e2b commit 03d7fa1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/example_route_data.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(core, io)]
#![feature(io)]

extern crate nickel;
extern crate http;
Expand All @@ -7,11 +7,11 @@ use nickel::{
Nickel, Request, Response, HttpRouter
};
use std::old_io::net::ip::Ipv4Addr;
use std::sync::atomic::AtomicUint;
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering::Relaxed;

struct Logger {
visits: AtomicUint
visits: AtomicUsize
}

fn main() {
Expand All @@ -24,6 +24,6 @@ fn main() {
// issue #20178
let rhandler: fn(&Request, &mut Response, &Logger) = root_handler;

server.get("/", (rhandler, Logger{visits: AtomicUint::new(0)}));
server.get("/", (rhandler, Logger{visits: AtomicUsize::new(0)}));
server.listen(Ipv4Addr(127, 0, 0, 1), 6767);
}

0 comments on commit 03d7fa1

Please sign in to comment.