Skip to content

Commit 302103e

Browse files
committed
Update
* Features changed (became deprecated or added to Rust) * Fixed warnings (unnecessary `unsafe`, unused import)
1 parent 07c2c72 commit 302103e

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

macros/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
#![crate_name="string_cache_macros"]
1111
#![crate_type="dylib"]
1212

13-
#![feature(macro_rules, plugin_registrar, quote, phase)]
13+
#![feature(plugin_registrar, quote)]
1414
#![allow(unused_imports)] // for quotes
1515

1616
extern crate core;
1717
extern crate syntax;
1818
extern crate rustc;
1919

20-
#[phase(plugin)]
20+
#[macro_use]
2121
extern crate lazy_static;
2222

2323
use rustc::plugin::Registry;

src/atom/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ macro_rules! bench_rand ( ($name:ident, $len:expr) => (
207207
// shift into printable ASCII
208208
*n = (*n % 0x40) + 0x20;
209209
}
210-
let s = unsafe { str::from_utf8(buf.as_slice()).unwrap() };
210+
let s = str::from_utf8(buf.as_slice()).unwrap();
211211
black_box(Atom::from_slice(s));
212212
});
213213
}

src/atom/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ mod bench;
298298
mod tests {
299299
use core::prelude::*;
300300

301-
use std::fmt;
302301
use std::thread::Thread;
303302
use super::Atom;
304303
use super::repr::{Static, Inline, Dynamic};

src/lib.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#![crate_name = "string_cache"]
1111
#![crate_type = "rlib"]
1212

13-
#![feature(phase, macro_rules, default_type_params, globs, old_orphan_check)]
13+
#![feature(plugin, old_orphan_check)]
1414
#![no_std]
1515

16-
#[phase(plugin, link)]
16+
#[macro_use]
1717
extern crate core;
1818

1919
extern crate alloc;
@@ -24,16 +24,17 @@ extern crate test;
2424

2525
extern crate std;
2626

27-
#[phase(plugin)]
27+
#[plugin]
2828
extern crate phf_mac;
2929
extern crate phf;
3030

31-
#[phase(plugin)]
31+
#[macro_use]
3232
extern crate lazy_static;
3333

3434
extern crate xxhash;
3535

36-
#[phase(plugin)]
36+
#[plugin]
37+
#[macro_use]
3738
extern crate string_cache_macros;
3839

3940
#[cfg(feature = "log-events")]

0 commit comments

Comments
 (0)