Skip to content

Commit 0d69b77

Browse files
author
Zoran Cvetkov
committed
cleanup
1 parent d178175 commit 0d69b77

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

graph/src/components/store/write.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,30 +1017,29 @@ mod test {
10171017

10181018
let value = value.clone();
10191019
let key = THING_TYPE.parse_key("one").unwrap();
1020-
let vid = 0i64;
10211020
match value {
10221021
Ins(block) => EntityModification::Insert {
10231022
key,
1024-
data: Arc::new(entity! { SCHEMA => id: "one", count: block, vid: vid }),
1023+
data: Arc::new(entity! { SCHEMA => id: "one", count: block }),
10251024
block,
10261025
end: None,
10271026
},
10281027
Ovw(block) => EntityModification::Overwrite {
10291028
key,
1030-
data: Arc::new(entity! { SCHEMA => id: "one", count: block, vid: vid }),
1029+
data: Arc::new(entity! { SCHEMA => id: "one", count: block }),
10311030
block,
10321031
end: None,
10331032
},
10341033
Rem(block) => EntityModification::Remove { key, block },
10351034
InsC(block, end) => EntityModification::Insert {
10361035
key,
1037-
data: Arc::new(entity! { SCHEMA => id: "one", count: block, vid: vid }),
1036+
data: Arc::new(entity! { SCHEMA => id: "one", count: block }),
10381037
block,
10391038
end: Some(end),
10401039
},
10411040
OvwC(block, end) => EntityModification::Overwrite {
10421041
key,
1043-
data: Arc::new(entity! { SCHEMA => id: "one", count: block, vid: vid }),
1042+
data: Arc::new(entity! { SCHEMA => id: "one", count: block }),
10441043
block,
10451044
end: Some(end),
10461045
},

graph/src/data/store/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ impl Entity {
924924
self.0.insert("vid", value.into())
925925
}
926926

927-
/// Sets the VID if not set. Should be used only for tests.
927+
/// Sets the VID if it's not already set. Should be used only for tests.
928928
#[cfg(debug_assertions)]
929929
pub fn set_vid_if_empty(&mut self) {
930930
let vid = self.get("vid");

store/test-store/tests/postgres/aggregation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub async fn insert(
8282
.map(|mut data| {
8383
let data_type = schema.entity_type("Data").unwrap();
8484
let key = data_type.key(data.id());
85-
let _ = data.set_vid_if_empty();
85+
data.set_vid_if_empty();
8686
EntityOperation::Set { data, key }
8787
})
8888
.collect();

0 commit comments

Comments
 (0)