Skip to content

Commit c6e47ae

Browse files
author
bors-servo
authored
Auto merge of #185 - emilio:precomputed-hash, r=nox
Version bump. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/string-cache/185) <!-- Reviewable:end -->
2 parents a35578c + 8518b44 commit c6e47ae

File tree

5 files changed

+7
-36
lines changed

5 files changed

+7
-36
lines changed

Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "string_cache"
4-
version = "0.4.0" # Also update README.md when making a semver-breaking change
4+
version = "0.5.0" # Also update README.md when making a semver-breaking change
55
authors = [ "The Servo Project Developers" ]
66
description = "A string interning library for Rust, developed as part of the Servo project."
77
license = "MIT / Apache-2.0"
@@ -22,7 +22,7 @@ name = "string_cache"
2222

2323
# Enable event logging for generating benchmark traces.
2424
# See examples/event-log.
25-
log-events = ["rustc-serialize"]
25+
log-events = []
2626

2727
# Use unstable features to optimize space and time (memory and CPU usage).
2828
unstable = []
@@ -33,12 +33,11 @@ lazy_static = "0.2"
3333
serde = "0.9"
3434
phf_shared = "0.7.4"
3535
debug_unreachable = "0.1.1"
36-
rustc-serialize = { version = "0.3", optional = true }
3736
heapsize = { version = "0.3", optional = true }
3837
string_cache_shared = {path = "./shared", version = "0.3"}
3938

4039
[dev-dependencies]
4140
rand = "0.3"
4241

4342
[build-dependencies]
44-
string_cache_codegen = { version = "0.3", path = "./string-cache-codegen" }
43+
string_cache_codegen = { version = "0.4", path = "./string-cache-codegen" }

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In `Cargo.toml`:
1212

1313
```toml
1414
[dependencies]
15-
string_cache = "0.4"
15+
string_cache = "0.5"
1616
```
1717

1818
In `lib.rs`:
@@ -31,10 +31,10 @@ In `Cargo.toml`:
3131
build = "build.rs"
3232

3333
[dependencies]
34-
string_cache = "0.4"
34+
string_cache = "0.5"
3535

3636
[build-dependencies]
37-
string_cache_codegen = "0.3"
37+
string_cache_codegen = "0.4"
3838
```
3939

4040
In `build.rs`:

src/event.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// except according to those terms.
99

1010
use std::sync::Mutex;
11-
use rustc_serialize::{Encoder, Encodable};
1211

1312
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Debug)]
1413
pub enum Event {
@@ -27,29 +26,3 @@ pub fn log(e: Event) {
2726
}
2827

2928
macro_rules! log (($e:expr) => (::event::log($e)));
30-
31-
// Serialize by converting to this private struct,
32-
// which produces more convenient output.
33-
34-
#[derive(RustcEncodable)]
35-
struct SerializeEvent<'a> {
36-
event: &'static str,
37-
id: u64,
38-
string: Option<&'a String>,
39-
}
40-
41-
impl Encodable for Event {
42-
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
43-
let (event, id, string) = match *self {
44-
Event::Intern(id) => ("intern", id, None),
45-
Event::Insert(id, ref s) => ("insert", id, Some(s)),
46-
Event::Remove(id) => ("remove", id, None),
47-
};
48-
49-
SerializeEvent {
50-
event: event,
51-
id: id,
52-
string: string
53-
}.encode(s)
54-
}
55-
}

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#![cfg_attr(all(test, feature = "unstable"), feature(test))]
1515

1616
#[cfg(all(test, feature = "unstable"))] extern crate test;
17-
#[cfg(feature = "log-events")] extern crate rustc_serialize;
1817
#[cfg(feature = "heapsize")] extern crate heapsize;
1918
#[cfg(test)] extern crate rand;
2019
#[macro_use] extern crate lazy_static;

string-cache-codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "string_cache_codegen"
4-
version = "0.3.1" # 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
55
authors = [ "The Servo Project Developers" ]
66
description = "A codegen library for string-cache, developed as part of the Servo project."
77
license = "MIT / Apache-2.0"

0 commit comments

Comments
 (0)