mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 18:02:56 +00:00
review: fix CheapCloneForRead for FullSlice
consider cases where offset != 0 Signed-off-by: Yuchen Liang <yuchen@neon.tech>
This commit is contained in:
@@ -50,9 +50,10 @@ where
|
||||
B: IoBuf + CheapCloneForRead,
|
||||
{
|
||||
fn cheap_clone(&self) -> Self {
|
||||
Self {
|
||||
slice: self.slice.get_ref().cheap_clone().slice_full(),
|
||||
}
|
||||
let bounds = self.slice.bounds();
|
||||
let clone = self.slice.get_ref().cheap_clone();
|
||||
let slice = clone.slice(bounds);
|
||||
Self { slice }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user