Store only clock::Local in InsertionFragment
This commit is contained in:
@@ -636,7 +636,7 @@ impl Buffer {
|
|||||||
.insertions
|
.insertions
|
||||||
.get(
|
.get(
|
||||||
&InsertionFragmentKey {
|
&InsertionFragmentKey {
|
||||||
timestamp: fragment.insertion_timestamp,
|
timestamp: fragment.insertion_timestamp.local(),
|
||||||
split_offset: fragment.insertion_offset,
|
split_offset: fragment.insertion_offset,
|
||||||
},
|
},
|
||||||
&(),
|
&(),
|
||||||
|
|||||||
@@ -410,14 +410,14 @@ struct FragmentTextSummary {
|
|||||||
|
|
||||||
#[derive(Eq, PartialEq, Clone, Debug)]
|
#[derive(Eq, PartialEq, Clone, Debug)]
|
||||||
struct InsertionFragment {
|
struct InsertionFragment {
|
||||||
timestamp: InsertionTimestamp,
|
timestamp: clock::Local,
|
||||||
split_offset: usize,
|
split_offset: usize,
|
||||||
fragment_id: Locator,
|
fragment_id: Locator,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
struct InsertionFragmentKey {
|
struct InsertionFragmentKey {
|
||||||
timestamp: InsertionTimestamp,
|
timestamp: clock::Local,
|
||||||
split_offset: usize,
|
split_offset: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2178,7 +2178,7 @@ impl sum_tree::KeyedItem for InsertionFragment {
|
|||||||
impl InsertionFragment {
|
impl InsertionFragment {
|
||||||
fn new(fragment: &Fragment) -> Self {
|
fn new(fragment: &Fragment) -> Self {
|
||||||
Self {
|
Self {
|
||||||
timestamp: fragment.insertion_timestamp,
|
timestamp: fragment.insertion_timestamp.local(),
|
||||||
split_offset: fragment.insertion_offset,
|
split_offset: fragment.insertion_offset,
|
||||||
fragment_id: fragment.id.clone(),
|
fragment_id: fragment.id.clone(),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user