summary refs log tree commit diff
path: root/rust/src/events/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/events/mod.rs')
-rw-r--r--rust/src/events/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/events/mod.rs b/rust/src/events/mod.rs

index 0bb6cdb181..209efb917b 100644 --- a/rust/src/events/mod.rs +++ b/rust/src/events/mod.rs
@@ -30,7 +30,7 @@ mod internal_metadata; /// Called when registering modules with python. pub fn register_module(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { - let child_module = PyModule::new_bound(py, "events")?; + let child_module = PyModule::new(py, "events")?; child_module.add_class::<internal_metadata::EventInternalMetadata>()?; child_module.add_function(wrap_pyfunction!(filter::event_visible_to_server_py, m)?)?; @@ -38,7 +38,7 @@ pub fn register_module(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> // We need to manually add the module to sys.modules to make `from // synapse.synapse_rust import events` work. - py.import_bound("sys")? + py.import("sys")? .getattr("modules")? .set_item("synapse.synapse_rust.events", child_module)?;