[go: nahoru, domu]

Skip to content

Commit

Permalink
Modify 'std::u64::MAX' to 'u64::MAX'
Browse files Browse the repository at this point in the history
'u64::MAX' is the recommended way to represent the largest number of u64 type(reference: https://doc.rust-lang.org/std/u64/constant.MAX.html) and 'std::u64::MAX' is now deprecated in a future Rust version.

Signed-off-by: zyy17 <zyylsxm@gmail.com>
  • Loading branch information
zyy17 committed Feb 9, 2022
1 parent 63cca61 commit de8e6f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/kubelet/src/kubelet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async fn start_plugin_registry(registrar: Option<Arc<PluginRegistry>>) -> anyhow
task::spawn(async {
loop {
// We run a delay here so we don't waste time on NOOP CPU cycles
tokio::time::sleep(tokio::time::Duration::from_secs(std::u64::MAX)).await;
tokio::time::sleep(tokio::time::Duration::from_secs(u64::MAX)).await;
}
})
.map_err(anyhow::Error::from)
Expand All @@ -206,7 +206,7 @@ async fn start_device_manager(device_manager: Option<Arc<DeviceManager>>) -> any
task::spawn(async {
loop {
// We run a delay here so we don't waste time on NOOP CPU cycles
tokio::time::sleep(tokio::time::Duration::from_secs(std::u64::MAX)).await;
tokio::time::sleep(tokio::time::Duration::from_secs(u64::MAX)).await;
}
})
.map_err(anyhow::Error::from)
Expand Down
2 changes: 1 addition & 1 deletion tests/device_plugin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl DevicePlugin for MockDevicePlugin {
.unwrap();
loop {
// ListAndWatch should not end
tokio::time::sleep(tokio::time::Duration::from_secs(std::u64::MAX)).await;
tokio::time::sleep(tokio::time::Duration::from_secs(u64::MAX)).await;
}
});
Ok(Response::new(Box::pin(
Expand Down

0 comments on commit de8e6f4

Please sign in to comment.