mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +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 y = x.clone();
|
||||
let z = y.clone();
|
||||
assert_eq!(x.is_unique(), true);
|
||||
assert_eq!(y.is_unique(), true);
|
||||
assert_eq!(z.is_unique(), true);
|
||||
assert!(x.is_unique());
|
||||
assert!(y.is_unique());
|
||||
assert!(z.is_unique());
|
||||
|
||||
let safe_x = SendSafeRocStr::from(x);
|
||||
let new_x = RocStr::from(safe_x);
|
||||
assert_eq!(new_x.is_unique(), true);
|
||||
assert_eq!(y.is_unique(), true);
|
||||
assert_eq!(z.is_unique(), true);
|
||||
assert!(new_x.is_unique());
|
||||
assert!(y.is_unique(),);
|
||||
assert!(z.is_unique(),);
|
||||
assert_eq!(new_x.as_str(), "short");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn empty_list_is_unique() {
|
||||
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
|
||||
.chunks(2)
|
||||
.map(|c| c.try_into().unwrap())
|
||||
.map(|c| u16::from_ne_bytes(c))
|
||||
.map(u16::from_ne_bytes)
|
||||
.collect();
|
||||
|
||||
// Verify that it's nul-terminated
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue