Skip to content

Commit 7b1d46b

Browse files
edward-shenfacebook-github-bot
authored andcommitted
Replace Duration::from_secs(10 * 60 * 60) to Duration::from_hours(10)
Summary: Rust 1.91 introduced `Duration::from_hours`. This diff replaces some instances of `Duration::from_secs` with the corresponding `Duration::from_hours`. Reviewed By: dtolnay Differential Revision: D88522593
1 parent abcff8a commit 7b1d46b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lighthouse.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,7 @@ mod tests {
695695
assert!(reason.contains("join timeout"), "{}", reason);
696696

697697
// increase elapsed time to pass join timeout
698-
state.participants.get_mut("a").unwrap().joined =
699-
now.sub(Duration::from_secs(10 * 60 * 60));
698+
state.participants.get_mut("a").unwrap().joined = now.sub(Duration::from_hours(10));
700699
let (quorum_met, reason) = quorum_compute(now, &state, &opt);
701700
assert!(quorum_met.is_some(), "{}", reason);
702701

0 commit comments

Comments
 (0)