Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@ jobs:
- run: cargo check --all-targets --no-default-features --features sharded-lock
- run: cargo check --all-targets --features shuttle

msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: taiki-e/install-action@v2
with:
tool: cargo-msrv
# `cargo msrv verify` checks that the crate compiles with the
# `rust-version` declared in Cargo.toml. The default `cargo check` skips
# dev-dependencies, which may require a newer Rust than downstream needs.
- run: cargo msrv verify
- run: cargo msrv verify -- cargo check --features stats
- run: cargo msrv verify -- cargo check --no-default-features
- run: cargo msrv verify -- cargo check --no-default-features --features sharded-lock

test:
name: Tests
strategy:
Expand Down
2 changes: 1 addition & 1 deletion src/linked_slab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,6 @@ impl<T> LinkedSlab<T> {
/// It should be noted that if cache key or value is some type like `Vec<T>`,
/// the memory allocated in the heap will not be counted.
pub fn memory_used(&self) -> usize {
self.entries.len() * size_of::<Entry<T>>()
self.entries.len() * std::mem::size_of::<Entry<T>>()
}
}
Loading