From ec487629b08211f1b95ffb90992028a4fa492174 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 19 Dec 2025 23:55:08 +0100 Subject: [PATCH] Fix --all-features build I have rust-analyzer set up to use `--all-features` by default, and so do a lot of my Cargo command aliases. Fix the build for `--all-features`. --- samply-symbols/src/shared.rs | 6 ++---- tools/dump_table/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/samply-symbols/src/shared.rs b/samply-symbols/src/shared.rs index 7549ce35b..031403c56 100644 --- a/samply-symbols/src/shared.rs +++ b/samply-symbols/src/shared.rs @@ -1,5 +1,3 @@ -#[cfg(feature = "partial_read_stats")] -use std::cell::RefCell; use std::fmt::{Debug, Display}; use std::future::Future; use std::marker::PhantomData; @@ -624,7 +622,7 @@ impl FileReadStats { } self.read_call_count += 1; } - chunkbits.set_all(true); + chunkbits.fill(true); } pub fn unique_bytes_read(&self) -> u64 { @@ -744,7 +742,7 @@ impl FileContentsWrapper { #[cfg(feature = "partial_read_stats")] impl Drop for FileContentsWrapper { fn drop(&mut self) { - eprintln!("{}", self.partial_read_stats.lock()); + eprintln!("{}", *self.partial_read_stats.lock().unwrap()); } } diff --git a/tools/dump_table/src/lib.rs b/tools/dump_table/src/lib.rs index 6ae417d0b..f54f8abce 100644 --- a/tools/dump_table/src/lib.rs +++ b/tools/dump_table/src/lib.rs @@ -120,7 +120,7 @@ type FileContentsType = samply_symbols::FileContentsWithChunkedCaching FileContentsType { - samply_symbols::FileContentsWithChunkedCaching::new(mmap.len() as u64, MmapFileContents(mmap)) + samply_symbols::FileContentsWithChunkedCaching::new(mmap.len(), MmapFileContents(mmap)) } #[cfg(not(feature = "chunked_caching"))]