From 793445a917f962bb3380c82c4201d666d89d950b Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Thu, 17 Dec 2015 08:18:12 -0800 Subject: [PATCH] Fix deprecation warnings for sleep_ms std::thread::sleep_ms has been deprecated in favor of std::thread::sleep with a std::time::Duration being passed as the argument. This updates all usage in this project of sleep_ms with sleep. --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 6d0b417704..d5f2b14afa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,6 +29,7 @@ use std::ffi::OsStr; use std::fmt; use std::iter; use std::thread; +use std::time::Duration; use multirust::*; use rust_install::dist; use openssl::crypto::hash::{Type, Hasher}; @@ -338,7 +339,7 @@ fn handle_install(cfg: &Cfg, should_move: bool, add_to_path: bool) -> Result<()> if should_move { if cfg!(windows) { // Wait for old version to exit - thread::sleep_ms(1000); + thread::sleep(Duration::from_millis(1000)); } try!(utils::rename_file("multirust", &src_path, &dest_path)); } else {