Skip to content

Commit

Permalink
fix: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
can-keklik committed Dec 18, 2024
1 parent 94f9410 commit 112a680
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
10 changes: 4 additions & 6 deletions lykiadb-server/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,10 @@ pub mod test_helpers {
.unwrap()
.expect(vec![RV::Str(Arc::new(part.to_string()))]);
} else {
self.out.write().unwrap().expect_str(
part
.split('\n')
.map(|x| x.to_string())
.collect(),
);
self.out
.write()
.unwrap()
.expect_str(part.split('\n').map(|x| x.to_string()).collect());
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions lykiadb-server/src/engine/stdlib/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ mod tests {
);

// Test array
let arr = vec![
RV::Num(1.0),
RV::Str(Arc::new("test".to_string()))
];
let arr = vec![RV::Num(1.0), RV::Str(Arc::new("test".to_string()))];
let array_rv = RV::Array(alloc_shared(arr));

assert_eq!(
Expand Down
10 changes: 2 additions & 8 deletions lykiadb-server/src/value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,7 @@ mod tests {
assert_eq!(not_found.is_in(&haystack), RV::Bool(false));

// Test array contains
let arr = vec![
RV::Num(1.0),
RV::Str(Arc::new("test".to_string()))
];
let arr = vec![RV::Num(1.0), RV::Str(Arc::new("test".to_string()))];
let array = RV::Array(alloc_shared(arr));

assert_eq!(RV::Num(1.0).is_in(&array), RV::Bool(true));
Expand Down Expand Up @@ -315,10 +312,7 @@ mod tests {
assert_eq!(RV::NaN.to_string(), "NaN");
assert_eq!(RV::Null.to_string(), "null");

let arr = vec![
RV::Num(1.0),
RV::Str(Arc::new("test".to_string()))
];
let arr = vec![RV::Num(1.0), RV::Str(Arc::new("test".to_string()))];
assert_eq!(RV::Array(alloc_shared(arr)).to_string(), "[1, test]");

let mut map = FxHashMap::default();
Expand Down

0 comments on commit 112a680

Please sign in to comment.