Skip to content

Commit

Permalink
[ISSUE #2207]🚸Add Default trait for SelectMappedBufferResult🍻 (#2208)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm authored Jan 11, 2025
1 parent be21e0c commit 8bdcd30
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rocketmq-store/src/base/select_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ pub struct SelectMappedBufferResult {
pub is_in_cache: bool,
}

impl Default for SelectMappedBufferResult {
fn default() -> Self {
Self {
start_offset: 0,
size: 0,
mapped_file: None,
is_in_cache: true,
}
}
}

impl SelectMappedBufferResult {
/// Returns the buffer.
pub fn get_buffer(&self) -> &[u8] {
Expand Down

0 comments on commit 8bdcd30

Please # to comment.