mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
clippy
This commit is contained in:
parent
d4e77856fe
commit
72d5b64c6f
1 changed files with 8 additions and 8 deletions
|
@ -341,22 +341,22 @@ mod test_roc_std {
|
||||||
let x = RocStr::from("short");
|
let x = RocStr::from("short");
|
||||||
let y = x.clone();
|
let y = x.clone();
|
||||||
let z = y.clone();
|
let z = y.clone();
|
||||||
assert_eq!(x.is_unique(), true);
|
assert!(x.is_unique());
|
||||||
assert_eq!(y.is_unique(), true);
|
assert!(y.is_unique());
|
||||||
assert_eq!(z.is_unique(), true);
|
assert!(z.is_unique());
|
||||||
|
|
||||||
let safe_x = SendSafeRocStr::from(x);
|
let safe_x = SendSafeRocStr::from(x);
|
||||||
let new_x = RocStr::from(safe_x);
|
let new_x = RocStr::from(safe_x);
|
||||||
assert_eq!(new_x.is_unique(), true);
|
assert!(new_x.is_unique());
|
||||||
assert_eq!(y.is_unique(), true);
|
assert!(y.is_unique(),);
|
||||||
assert_eq!(z.is_unique(), true);
|
assert!(z.is_unique(),);
|
||||||
assert_eq!(new_x.as_str(), "short");
|
assert_eq!(new_x.as_str(), "short");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn empty_list_is_unique() {
|
fn empty_list_is_unique() {
|
||||||
let roc_list = RocList::<RocStr>::empty();
|
let roc_list = RocList::<RocStr>::empty();
|
||||||
assert_eq!(roc_list.is_unique(), true);
|
assert!(roc_list.is_unique());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ mod with_terminator {
|
||||||
let items: Vec<u16> = bytes
|
let items: Vec<u16> = bytes
|
||||||
.chunks(2)
|
.chunks(2)
|
||||||
.map(|c| c.try_into().unwrap())
|
.map(|c| c.try_into().unwrap())
|
||||||
.map(|c| u16::from_ne_bytes(c))
|
.map(u16::from_ne_bytes)
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
// Verify that it's nul-terminated
|
// Verify that it's nul-terminated
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue