diff --git a/vm/src/stdlib/mod.rs b/vm/src/stdlib/mod.rs index 8f4cb7d92..d702a0e14 100644 --- a/vm/src/stdlib/mod.rs +++ b/vm/src/stdlib/mod.rs @@ -40,7 +40,7 @@ mod symtable; mod sysconfigdata; #[cfg(feature = "threading")] mod thread; -mod time_module; +mod time; mod unicodedata; mod warnings; mod weakref; @@ -126,7 +126,7 @@ pub fn get_module_inits() -> StdlibMap { "_sre" => sre::make_module, "_string" => string::make_module, "_struct" => pystruct::make_module, - "time" => time_module::make_module, + "time" => time::make_module, "_weakref" => weakref::make_module, "_imp" => imp::make_module, "unicodedata" => unicodedata::make_module, diff --git a/vm/src/stdlib/select.rs b/vm/src/stdlib/select.rs index b6e81710d..4ac54f28f 100644 --- a/vm/src/stdlib/select.rs +++ b/vm/src/stdlib/select.rs @@ -150,7 +150,7 @@ fn sec_to_timeval(sec: f64) -> timeval { #[pymodule(name = "select")] mod decl { - use super::super::time_module; + use super::super::time; use super::*; use crate::exceptions::IntoPyException; use crate::function::OptionalOption; @@ -175,7 +175,7 @@ mod decl { return Err(vm.new_value_error("timeout must be positive".to_owned())); } } - let deadline = timeout.map(|s| time_module::get_time() + s); + let deadline = timeout.map(|s| time::get_time() + s); let seq2set = |list| -> PyResult<(Vec, FdSet)> { let v = vm.extract_elements::(list)?; @@ -214,7 +214,7 @@ mod decl { vm.check_signals()?; if let Some(ref mut timeout) = timeout { - *timeout = deadline.unwrap() - time_module::get_time(); + *timeout = deadline.unwrap() - time::get_time(); if *timeout < 0.0 { r.clear(); w.clear(); diff --git a/vm/src/stdlib/time_module.rs b/vm/src/stdlib/time.rs similarity index 100% rename from vm/src/stdlib/time_module.rs rename to vm/src/stdlib/time.rs