Skip to content

Commit b82f41f

Browse files
committed
Make examples/* crates build again.
1 parent fabedb0 commit b82f41f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples/event-log/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
extern crate string_cache;
1111

12-
use string_cache::Atom;
12+
use string_cache::DefaultAtom;
1313
use string_cache::event;
1414

1515
use std::io;
@@ -21,7 +21,7 @@ fn main() {
2121
io::stdin().read_to_string(&mut stdin).unwrap();
2222
let mut atoms = vec![];
2323
for word in stdin.split(|c: char| c.is_whitespace()) {
24-
atoms.push(Atom::from(word));
24+
atoms.push(DefaultAtom::from(word));
2525
}
2626

2727
let log = event::LOG.lock().unwrap();

examples/summarize-events/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ extern crate phf_shared;
1616
#[allow(dead_code)]
1717
mod shared;
1818

19-
use string_cache::Atom;
19+
use string_cache::DefaultAtom;
2020

2121
use std::{env, cmp};
2222
use std::collections::hash_map::{HashMap, Entry};
23+
use std::marker::PhantomData;
2324
use std::path::Path;
2425

2526
#[derive(RustcDecodable, Debug)]
@@ -88,7 +89,7 @@ fn main() {
8889

8990
// FIXME: We really shouldn't be allowed to do this. It's a memory-safety
9091
// hazard; the field is only public for the atom!() macro.
91-
_ => Atom { unsafe_data: ev.id }.to_string(),
92+
_ => DefaultAtom { unsafe_data: ev.id, phantom: PhantomData }.to_string(),
9293
};
9394

9495
match summary.entry(string) {

0 commit comments

Comments
 (0)