Skip to content

Commit 760dced

Browse files
committed
tests: Fix warnings from clippy::vec_init_then_push
1 parent 747a354 commit 760dced

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

graph/src/data/store/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,10 +892,9 @@ pub enum EntityValidationErrorInner {
892892
macro_rules! entity {
893893
($schema:expr => $($name:ident: $value:expr,)*) => {
894894
{
895-
let mut result = Vec::new();
896-
$(
897-
result.push(($crate::data::value::Word::from(stringify!($name)), $crate::data::store::Value::from($value)));
898-
)*
895+
let result = vec![$(
896+
($crate::data::value::Word::from(stringify!($name)), $crate::data::store::Value::from($value)),
897+
)*];
899898
$schema.make_entity(result).unwrap()
900899
}
901900
};

0 commit comments

Comments
 (0)