Skip to content

Commit 122d793

Browse files
committed
Cargo insists on no shared files between crates.
1 parent ea65dc2 commit 122d793

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ phf_shared = "0.7.4"
3737
debug_unreachable = "0.1.1"
3838
rustc-serialize = { version = "0.3", optional = true }
3939
heapsize = { version = "0.3", optional = true }
40+
string_cache_shared = {path = "./shared", version = "0.3"}
4041

4142
[dev-dependencies]
4243
rand = "0.3"

shared/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
3+
name = "string_cache_shared"
4+
version = "0.3.0"
5+
authors = [ "The Servo Project Developers" ]
6+
description = "Code share between string_cache and string_cache_codegen."
7+
license = "MIT / Apache-2.0"
8+
repository = "https://github.com/servo/string-cache"
9+
10+
[lib]
11+
path = "lib.rs"

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#[macro_use] extern crate debug_unreachable;
2222
extern crate serde;
2323
extern crate phf_shared;
24+
extern crate string_cache_shared as shared;
2425

2526
pub use atom::{Atom, StaticAtomSet, PhfStrSet, EmptyStaticAtomSet, DefaultAtom};
2627

@@ -30,9 +31,6 @@ pub mod event;
3031

3132
pub mod atom;
3233

33-
#[path = "../string-cache-codegen/shared.rs"]
34-
mod shared;
35-
3634
// Make test_atom! macro work in this crate.
3735
// `$crate` would not be appropriate for other crates creating such macros
3836
mod string_cache {

string-cache-codegen/Cargo.toml

Lines changed: 2 additions & 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.0" # Also update ../README.md when making a semver-breaking change
4+
version = "0.3.1" # 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"
@@ -13,4 +13,5 @@ name = "string_cache_codegen"
1313
path = "lib.rs"
1414

1515
[dependencies]
16+
string_cache_shared = {path = "../shared", version = "0.3"}
1617
phf_generator = "0.7.15"

string-cache-codegen/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
// except according to those terms.
99

1010
extern crate phf_generator;
11+
extern crate string_cache_shared as shared;
1112

1213
use std::collections::HashSet;
1314
use std::fs::File;
1415
use std::io::{self, Write, BufWriter};
1516
use std::path::Path;
1617

17-
#[allow(dead_code)]
18-
mod shared;
19-
2018
/// A builder for a static atom set and relevant macros
2119
pub struct AtomType {
2220
path: String,

0 commit comments

Comments
 (0)