Skip to content

Commit

Permalink
fix code error
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm committed Jan 11, 2025
1 parent a4cc6db commit 83f76a0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ impl MappedFile for DefaultMappedFile {
let read_end_position = pos + size;
if read_end_position <= read_position as usize {
if MappedFile::hold(self) {
let buffer = BytesMut::from(self.mmapped_file.as_ref()[pos..read_end_position]);
let buffer = BytesMut::from(&self.mmapped_file.as_ref()[pos..read_end_position]);
MappedFile::release(self);

Check warning on line 564 in rocketmq-store/src/log_file/mapped_file/default_mapped_file_impl.rs

View check run for this annotation

Codecov / codecov/patch

rocketmq-store/src/log_file/mapped_file/default_mapped_file_impl.rs#L563-L564

Added lines #L563 - L564 were not covered by tests
Some(buffer.freeze())
} else {
Expand Down

0 comments on commit 83f76a0

Please sign in to comment.