Skip to content

Commit a5008e9

Browse files
edward-shenfacebook-github-bot
authored andcommitted
Replace Duration::from_secs(3 * 3600) to Duration::from_hours(3)
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: D88522589
1 parent abcff8a commit a5008e9

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_secs(3 * 60)));
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)