File tree Expand file tree Collapse file tree 5 files changed +8
-17
lines changed
Expand file tree Collapse file tree 5 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 66 - stable
77os :
88 - linux
9- - osx
109script :
1110 - cargo build
1211 - cargo test
Original file line number Diff line number Diff line change 11[package ]
22
33name = " string_cache"
4- version = " 0.3 .0" # Also update README.md when making a semver-breaking change
4+ version = " 0.4 .0" # Also update README.md when making a semver-breaking change
55authors = [ " The Servo Project Developers" ]
66description = " A string interning library for Rust, developed as part of the Servo project."
77license = " MIT / Apache-2.0"
@@ -27,12 +27,9 @@ log-events = ["rustc-serialize"]
2727# Use unstable features to optimize space and time (memory and CPU usage).
2828unstable = []
2929
30- # HeapSizeOf support
31- heap_size = [" heapsize" ]
32-
3330[dependencies ]
3431lazy_static = " 0.2"
35- serde = " 0.8 "
32+ serde = " 0.9 "
3633phf_shared = " 0.7.4"
3734debug_unreachable = " 0.1.1"
3835rustc-serialize = { version = " 0.3" , optional = true }
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ In `Cargo.toml`:
1212
1313``` toml
1414[dependencies ]
15- string_cache = " 0.3 "
15+ string_cache = " 0.4 "
1616```
1717
1818In ` lib.rs ` :
@@ -31,7 +31,7 @@ In `Cargo.toml`:
3131build = " build.rs"
3232
3333[dependencies ]
34- string_cache = " 0.3 "
34+ string_cache = " 0.4 "
3535
3636[build-dependencies ]
3737string_cache_codegen = " 0.3"
Original file line number Diff line number Diff line change @@ -228,11 +228,6 @@ impl<Static: StaticAtomSet> Atom<Static> {
228228 pub fn get_hash ( & self ) -> u32 {
229229 ( ( self . unsafe_data >> 32 ) ^ self . unsafe_data ) as u32
230230 }
231-
232- pub fn with_str < F , Output > ( & self , cb : F ) -> Output
233- where F : FnOnce ( & str ) -> Output {
234- cb ( self )
235- }
236231}
237232
238233impl < Static : StaticAtomSet > Default for Atom < Static > {
@@ -431,16 +426,16 @@ impl<Static: StaticAtomSet> AsRef<str> for Atom<Static> {
431426}
432427
433428impl < Static : StaticAtomSet > Serialize for Atom < Static > {
434- fn serialize < S > ( & self , serializer : & mut S ) -> Result < ( ) , S :: Error > where S : Serializer {
429+ fn serialize < S > ( & self , serializer : S ) -> Result < S :: Ok , S :: Error > where S : Serializer {
435430 let string: & str = self . as_ref ( ) ;
436431 string. serialize ( serializer)
437432 }
438433}
439434
440435impl < Static : StaticAtomSet > Deserialize for Atom < Static > {
441- fn deserialize < D > ( deserializer : & mut D ) -> Result < Self , D :: Error > where D : Deserializer {
436+ fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error > where D : Deserializer {
442437 let string: String = try!( Deserialize :: deserialize ( deserializer) ) ;
443- Ok ( Atom :: from ( & * string) )
438+ Ok ( Atom :: from ( string) )
444439 }
445440}
446441
Original file line number Diff line number Diff line change 1515
1616#[ cfg( all( test, feature = "unstable" ) ) ] extern crate test;
1717#[ cfg( feature = "log-events" ) ] extern crate rustc_serialize;
18- #[ cfg( feature = "heapsize" ) ] # [ macro_use ] extern crate heapsize;
18+ #[ cfg( feature = "heapsize" ) ] extern crate heapsize;
1919#[ cfg( test) ] extern crate rand;
2020#[ macro_use] extern crate lazy_static;
2121#[ macro_use] extern crate debug_unreachable;
You can’t perform that action at this time.
0 commit comments