Skip to content

Commit d191aae

Browse files
committed
Switch to the 2018 edition
1 parent d968f8c commit d191aae

File tree

9 files changed

+9
-22
lines changed

9 files changed

+9
-22
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ description = "A string interning library for Rust, developed as part of the Ser
66
license = "MIT / Apache-2.0"
77
repository = "https://github.com/servo/string-cache"
88
documentation = "https://docs.rs/string_cache/"
9+
edition = "2018"
910

1011
# Do not `exclude` ./string-cache-codegen because we want to include
1112
# ./string-cache-codegen/shared.rs, and `include` is a pain to use

examples/simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern crate string_cache;
1+
22

33
use string_cache::DefaultAtom;
44

integration-tests/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.0.1"
44
authors = [ "The Servo Project Developers" ]
55
build = "build.rs"
66
publish = false
7+
edition = "2018"
78

89
[lib]
910
doctest = false

integration-tests/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern crate string_cache_codegen;
1+
use string_cache_codegen;
22

33
use std::env;
44
use std::path::Path;

integration-tests/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
#![allow(non_upper_case_globals)]
1313
#![cfg_attr(feature = "unstable", feature(test))]
1414

15-
extern crate string_cache;
16-
17-
#[cfg(feature = "unstable")]
18-
extern crate rand;
1915
#[cfg(feature = "unstable")]
2016
extern crate test;
2117

src/atom.rs

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

1010
#![allow(non_upper_case_globals)]
1111

12+
use debug_unreachable::debug_unreachable;
13+
use lazy_static::lazy_static;
1214
use phf_shared;
1315
use serde::{Deserialize, Deserializer, Serialize, Serializer};
1416

src/lib.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,6 @@
105105
#![crate_type = "rlib"]
106106
#![cfg_attr(test, deny(warnings))]
107107

108-
#[macro_use]
109-
extern crate lazy_static;
110-
#[macro_use]
111-
extern crate debug_unreachable;
112-
extern crate phf_shared;
113-
extern crate precomputed_hash;
114-
extern crate serde;
115-
116-
pub use atom::{Atom, DefaultAtom, EmptyStaticAtomSet, PhfStrSet, StaticAtomSet};
108+
pub use crate::atom::{Atom, DefaultAtom, EmptyStaticAtomSet, PhfStrSet, StaticAtomSet};
117109

118110
pub mod atom;

string-cache-codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2-
32
name = "string_cache_codegen"
43
version = "0.5.0" # Also update ../README.md when making a semver-breaking change
54
authors = [ "The Servo Project Developers" ]
65
description = "A codegen library for string-cache, developed as part of the Servo project."
76
license = "MIT / Apache-2.0"
87
repository = "https://github.com/servo/string-cache"
98
documentation = "https://docs.rs/string_cache_codegen/"
9+
edition = "2018"
1010

1111
[lib]
1212
name = "string_cache_codegen"

string-cache-codegen/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,7 @@
6868
6969
#![recursion_limit = "128"]
7070

71-
extern crate phf_generator;
72-
extern crate phf_shared;
73-
#[macro_use]
74-
extern crate quote;
75-
extern crate proc_macro2;
76-
71+
use quote::quote;
7772
use std::collections::HashSet;
7873
use std::fs::File;
7974
use std::io::{self, BufWriter, Write};

0 commit comments

Comments
 (0)