Skip to content

Commit 5f51536

Browse files
pfmooneyPatrick Mooney
authored andcommitted
Fix lingering clippy nits
1 parent c81fc5c commit 5f51536

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bin/propolis-server/src/lib/migrate/codec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ mod encoder_tests {
259259

260260
fn encode(m: Message) -> Vec<u8> {
261261
if let tungstenite::Message::Binary(bytes) = m.try_into().unwrap() {
262-
return bytes;
262+
bytes
263263
} else {
264264
panic!();
265265
}

lib/propolis/src/vmm/time.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ mod test {
485485

486486
// error case: migrate delta overflows i64
487487
// (i64::MAX + 1) sec - 0 sec
488-
let dst_wc = Duration::from_nanos(((i64::MAX as u64) + 1) as u64);
488+
let dst_wc = Duration::from_nanos((i64::MAX as u64) + 1);
489489
let res = adjust_time_data(base_time_data(), 0, dst_wc);
490490
assert!(res.is_err());
491491
assert!(matches!(
@@ -659,7 +659,7 @@ mod test {
659659
let dst_wc = Duration::from_nanos(300);
660660

661661
// expect: 1 day, 1 min, 200 ns
662-
let expect = ((1 * SEC_PER_DAY + 60) * NS_PER_SEC) as i64 + 200;
662+
let expect = ((SEC_PER_DAY + 60) * NS_PER_SEC) as i64 + 200;
663663
let res = adjust_time_data(src_td, dst_hrt, dst_wc);
664664
assert!(res.is_ok());
665665
assert_eq!(res.unwrap().0.boot_hrtime, expect);
@@ -693,7 +693,7 @@ mod test {
693693
let dst_wc = Duration::new(65, 500);
694694

695695
// expect: - (1 day, 1 min, 200 ns)
696-
let expect: i64 = -(((1 * SEC_PER_DAY + 60) * NS_PER_SEC) as i64 + 200);
696+
let expect: i64 = -(((SEC_PER_DAY + 60) * NS_PER_SEC) as i64 + 200);
697697
let res = adjust_time_data(src_td, dst_hrt, dst_wc);
698698
assert!(res.is_ok());
699699
assert_eq!(res.unwrap().0.boot_hrtime, expect);

packaging/propolis-package/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::fs::create_dir_all;
1313
use std::path::Path;
1414
use std::time::Duration;
1515

16-
const PKG_NAME: &'static str = "propolis-server";
16+
const PKG_NAME: &str = "propolis-server";
1717

1818
fn in_progress_style() -> ProgressStyle {
1919
ProgressStyle::default_bar()

0 commit comments

Comments
 (0)