Skip to content

Commit 4f17692

Browse files
Address nits in paged serialization implementation.
1 parent eec358e commit 4f17692

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

measureme/src/profiler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl Profiler {
2525
// The first thing in the file must be the top-level file header.
2626
write_file_header(&mut file, FILE_MAGIC_TOP_LEVEL)?;
2727

28-
let sink_builder = SerializationSinkBuilder::from_file(file)?;
28+
let sink_builder = SerializationSinkBuilder::new_from_file(file)?;
2929
let event_sink = Arc::new(sink_builder.new_sink(PageTag::Events));
3030

3131
// The first thing in every stream we generate must be the stream header.

measureme/src/serialization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub struct SerializationSink {
8888
pub struct SerializationSinkBuilder(SharedState);
8989

9090
impl SerializationSinkBuilder {
91-
pub fn from_file(file: fs::File) -> Result<Self, Box<dyn Error + Send + Sync>> {
91+
pub fn new_from_file(file: fs::File) -> Result<Self, Box<dyn Error + Send + Sync>> {
9292
Ok(Self(SharedState(Arc::new(Mutex::new(
9393
BackingStorage::File(file),
9494
)))))
@@ -399,7 +399,7 @@ impl SerializationSink {
399399
curr_addr
400400
}
401401

402-
pub fn as_std_write<'a>(&'a self) -> StdWriteAdapter<'a> {
402+
pub fn as_std_write<'a>(&'a self) -> impl Write + 'a {
403403
StdWriteAdapter(self)
404404
}
405405
}

0 commit comments

Comments
 (0)