Skip to content

Commit ee51839

Browse files
edward-shenmeta-codesync[bot]
authored andcommitted
Replace Duration::from_secs(3 * 3600) to Duration::from_hours(3) (#299)
Summary: Pull Request resolved: #299 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: D88522589 fbshipit-source-id: 234541aa06e20e74ce80b9e4d4756dc3e7d45396
1 parent d15dfbe commit ee51839

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/timeout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ mod tests {
8080
map
8181
}
8282

83-
assert!(try_parse_grpc_timeout(&map("3H")).unwrap() == Some(Duration::from_secs(3 * 3600)));
83+
assert!(try_parse_grpc_timeout(&map("3H")).unwrap() == Some(Duration::from_hours(3)));
8484
assert!(try_parse_grpc_timeout(&map("3M")).unwrap() == Some(Duration::from_mins(3)));
8585
assert!(try_parse_grpc_timeout(&map("3S")).unwrap() == Some(Duration::from_secs(3)));
8686
assert!(try_parse_grpc_timeout(&map("3m")).unwrap() == Some(Duration::from_millis(3)));

0 commit comments

Comments
 (0)