File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 3636 run : |
3737 cargo build --no-default-features
3838 cargo build
39+ cargo build --features malloc_size_of
3940 - uses : actions-rs/cargo@v1
4041 with :
4142 command : test
Original file line number Diff line number Diff line change 11[package ]
22name = " string_cache"
3- version = " 0.8.8 " # Also update README.md when making a semver-breaking change
3+ version = " 0.8.9 " # Also update README.md when making a semver-breaking change
44authors = [" The Servo Project Developers" ]
55description = " A string interning library for Rust, developed as part of the Servo project."
66license = " MIT OR Apache-2.0"
@@ -25,6 +25,7 @@ default = ["serde_support"]
2525[dependencies ]
2626precomputed-hash = " 0.1"
2727serde = { version = " 1" , optional = true }
28+ malloc_size_of = { version = " 0.1" , default-features = false , optional = true }
2829phf_shared = " 0.11"
2930new_debug_unreachable = " 1.0.2"
3031parking_lot = " 0.12"
Original file line number Diff line number Diff line change @@ -82,6 +82,15 @@ pub struct Atom<Static> {
8282 phantom : PhantomData < Static > ,
8383}
8484
85+ // This isn't really correct as the Atoms can technically take up space. But I guess it's ok
86+ // as it is possible to measure the size of the atom set separately/
87+ #[ cfg( feature = "malloc_size_of" ) ]
88+ impl < Static : StaticAtomSet > malloc_size_of:: MallocSizeOf for Atom < Static > {
89+ fn size_of ( & self , _ops : & mut malloc_size_of:: MallocSizeOfOps ) -> usize {
90+ 0
91+ }
92+ }
93+
8594// FIXME: bound removed from the struct definition before of this error for pack_static:
8695// "error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable"
8796// https://github.com/rust-lang/rust/issues/57563
You can’t perform that action at this time.
0 commit comments