In Rust, a function can be marked as deprecated to indicate that the function shouldn't be used anymore in the future. Hence, consider avoiding the use of deprecated functions in your code as much as possible.
fn main() {
std::thread::sleep_ms(10); // bad
}
fn main() {
std::thread::sleep(Duration::from_millis(10)); // fine
}