Skip to content

Commit 7d53c65

Browse files
authored
Merge pull request RustPython#2885 from Snowapril/rename-time-module
Rename time_module.rs to time.rs
2 parents 7cc2a54 + 5049611 commit 7d53c65

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

vm/src/stdlib/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ mod symtable;
4040
mod sysconfigdata;
4141
#[cfg(feature = "threading")]
4242
mod thread;
43-
mod time_module;
43+
mod time;
4444
mod unicodedata;
4545
mod warnings;
4646
mod weakref;
@@ -126,7 +126,7 @@ pub fn get_module_inits() -> StdlibMap {
126126
"_sre" => sre::make_module,
127127
"_string" => string::make_module,
128128
"_struct" => pystruct::make_module,
129-
"time" => time_module::make_module,
129+
"time" => time::make_module,
130130
"_weakref" => weakref::make_module,
131131
"_imp" => imp::make_module,
132132
"unicodedata" => unicodedata::make_module,

vm/src/stdlib/select.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fn sec_to_timeval(sec: f64) -> timeval {
150150

151151
#[pymodule(name = "select")]
152152
mod decl {
153-
use super::super::time_module;
153+
use super::super::time;
154154
use super::*;
155155
use crate::exceptions::IntoPyException;
156156
use crate::function::OptionalOption;
@@ -175,7 +175,7 @@ mod decl {
175175
return Err(vm.new_value_error("timeout must be positive".to_owned()));
176176
}
177177
}
178-
let deadline = timeout.map(|s| time_module::get_time() + s);
178+
let deadline = timeout.map(|s| time::get_time() + s);
179179

180180
let seq2set = |list| -> PyResult<(Vec<Selectable>, FdSet)> {
181181
let v = vm.extract_elements::<Selectable>(list)?;
@@ -214,7 +214,7 @@ mod decl {
214214
vm.check_signals()?;
215215

216216
if let Some(ref mut timeout) = timeout {
217-
*timeout = deadline.unwrap() - time_module::get_time();
217+
*timeout = deadline.unwrap() - time::get_time();
218218
if *timeout < 0.0 {
219219
r.clear();
220220
w.clear();
File renamed without changes.

0 commit comments

Comments
 (0)