Skip to content

Commit

Permalink
python-oxidized-importer: remove mut from state
Browse files Browse the repository at this point in the history
It doesn't need to be mutable according to the Rust compiler.
  • Loading branch information
indygreg committed Nov 3, 2024
1 parent 0586d70 commit 1ceca86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python-oxidized-importer/src/importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ pub fn replace_meta_path_importers<'a, 'p>(
resources_state: Box<PythonResourcesState<'a, u8>>,
importer_state_callback: Option<impl FnOnce(&mut ImporterState)>,
) -> PyResult<&'p PyCell<OxidizedFinder>> {
let mut state = get_module_state(oxidized_importer)?;
let state = get_module_state(oxidized_importer)?;

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

Expand Down
2 changes: 1 addition & 1 deletion python-oxidized-importer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ fn module_init(py: Python, m: &PyModule) -> PyResult<()> {
return Err(PyImportError::new_err("module requires Python 3.8+"));
}

let mut state = get_module_state(m)?;
let state = get_module_state(m)?;

state.initialized = false;

Expand Down

0 comments on commit 1ceca86

Please sign in to comment.