Skip to content

Commit 1ceca86

Browse files
committed
python-oxidized-importer: remove mut from state
It doesn't need to be mutable according to the Rust compiler.
1 parent 0586d70 commit 1ceca86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python-oxidized-importer/src/importer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ pub fn replace_meta_path_importers<'a, 'p>(
12851285
resources_state: Box<PythonResourcesState<'a, u8>>,
12861286
importer_state_callback: Option<impl FnOnce(&mut ImporterState)>,
12871287
) -> PyResult<&'p PyCell<OxidizedFinder>> {
1288-
let mut state = get_module_state(oxidized_importer)?;
1288+
let state = get_module_state(oxidized_importer)?;
12891289

12901290
let sys_module = py.import("sys")?;
12911291

python-oxidized-importer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ fn module_init(py: Python, m: &PyModule) -> PyResult<()> {
180180
return Err(PyImportError::new_err("module requires Python 3.8+"));
181181
}
182182

183-
let mut state = get_module_state(m)?;
183+
let state = get_module_state(m)?;
184184

185185
state.initialized = false;
186186

0 commit comments

Comments
 (0)