Skip to content

Commit d30f910

Browse files
committed
Run fmt
1 parent 9f95da8 commit d30f910

File tree

5 files changed

+27
-37
lines changed

5 files changed

+27
-37
lines changed

db4-storage/src/api/graph_props.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
use crate::{
2-
error::StorageError,
3-
segments::graph_prop::segment::MemGraphPropSegment,
4-
wal::LSN,
5-
};
1+
use crate::{error::StorageError, segments::graph_prop::segment::MemGraphPropSegment, wal::LSN};
62
use parking_lot::{RwLockReadGuard, RwLockWriteGuard};
73
use raphtory_api::core::entities::properties::{meta::Meta, prop::Prop, tprop::TPropOps};
84
use std::{fmt::Debug, path::Path, sync::Arc};

db4-storage/src/pages/locked/graph_props.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::{
2-
api::graph_props::GraphPropSegmentOps,
3-
segments::graph_prop::segment::MemGraphPropSegment,
2+
api::graph_props::GraphPropSegmentOps, segments::graph_prop::segment::MemGraphPropSegment,
43
wal::LSN,
54
};
65
use parking_lot::RwLockWriteGuard;

db4-storage/src/pages/session.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,11 @@ use crate::{
99
};
1010
use parking_lot::RwLockWriteGuard;
1111
use raphtory_api::core::{
12-
entities::properties::{
13-
meta::{NODE_ID_IDX, STATIC_GRAPH_LAYER_ID},
14-
prop::Prop,
15-
},
12+
entities::properties::{meta::STATIC_GRAPH_LAYER_ID, prop::Prop},
1613
storage::dict_mapper::MaybeNew,
1714
};
1815
use raphtory_core::{
19-
entities::{EID, ELID, GidRef, VID},
16+
entities::{EID, ELID, VID},
2017
storage::timeindex::AsTime,
2118
};
2219

raphtory/src/db/api/mutation/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ pub fn time_from_input_session<
5151
}
5252
})
5353
}
54-

raphtory/src/db/api/mutation/property_addition_ops.rs

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ use raphtory_api::core::entities::properties::prop::Prop;
66
use raphtory_storage::{
77
core_ops::CoreGraphOps,
88
mutation::{
9-
addition_ops::{InternalAdditionOps},
10-
durability_ops::DurabilityOps,
9+
addition_ops::InternalAdditionOps, durability_ops::DurabilityOps,
1110
property_addition_ops::InternalPropertyAdditionOps,
1211
},
1312
};
@@ -27,17 +26,15 @@ pub trait PropertyAdditionOps:
2726
props: PII,
2827
) -> Result<(), GraphError>;
2928

30-
fn add_metadata<
31-
PN: AsRef<str>,
32-
P: Into<Prop>,
33-
PII: IntoIterator<Item = (PN, P)>,
34-
>(&self, props: PII) -> Result<(), GraphError>;
29+
fn add_metadata<PN: AsRef<str>, P: Into<Prop>, PII: IntoIterator<Item = (PN, P)>>(
30+
&self,
31+
props: PII,
32+
) -> Result<(), GraphError>;
3533

36-
fn update_metadata<
37-
PN: AsRef<str>,
38-
P: Into<Prop>,
39-
PII: IntoIterator<Item = (PN, P)>,
40-
>(&self, props: PII) -> Result<(), GraphError>;
34+
fn update_metadata<PN: AsRef<str>, P: Into<Prop>, PII: IntoIterator<Item = (PN, P)>>(
35+
&self,
36+
props: PII,
37+
) -> Result<(), GraphError>;
4138
}
4239

4340
impl<
@@ -105,20 +102,18 @@ impl<
105102
Ok(())
106103
}
107104

108-
fn add_metadata<
109-
PN: AsRef<str>,
110-
P: Into<Prop>,
111-
PII: IntoIterator<Item = (PN, P)>,
112-
>(&self, props: PII) -> Result<(), GraphError> {
105+
fn add_metadata<PN: AsRef<str>, P: Into<Prop>, PII: IntoIterator<Item = (PN, P)>>(
106+
&self,
107+
props: PII,
108+
) -> Result<(), GraphError> {
113109
let is_update = false;
114110
add_metadata_impl(self, props, is_update)
115111
}
116112

117-
fn update_metadata<
118-
PN: AsRef<str>,
119-
P: Into<Prop>,
120-
PII: IntoIterator<Item = (PN, P)>,
121-
>(&self, props: PII) -> Result<(), GraphError> {
113+
fn update_metadata<PN: AsRef<str>, P: Into<Prop>, PII: IntoIterator<Item = (PN, P)>>(
114+
&self,
115+
props: PII,
116+
) -> Result<(), GraphError> {
122117
let is_update = true;
123118
add_metadata_impl(self, props, is_update)
124119
}
@@ -158,9 +153,13 @@ where
158153
.collect::<Vec<_>>();
159154

160155
let mut writer = if is_update {
161-
graph.internal_update_metadata(&props).map_err(into_graph_err)?
156+
graph
157+
.internal_update_metadata(&props)
158+
.map_err(into_graph_err)?
162159
} else {
163-
graph.internal_add_metadata(&props).map_err(into_graph_err)?
160+
graph
161+
.internal_add_metadata(&props)
162+
.map_err(into_graph_err)?
164163
};
165164

166165
let props_for_wal = props_with_status

0 commit comments

Comments
 (0)