From 94d107d6cdbb86c7eec84a25fcd5b9e254c57c6d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 13 Aug 2026 16:46:59 +0100 Subject: [PATCH] Reword python wrapping types --- rust/src/homeserver.rs | 7 +++---- rust/src/reactor.rs | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/rust/src/homeserver.rs b/rust/src/homeserver.rs index 74885d5e09..78001318f2 100644 --- a/rust/src/homeserver.rs +++ b/rust/src/homeserver.rs @@ -22,10 +22,9 @@ use crate::runtime::RustRuntime; /// The Python `HomeServer`, as seen from Rust. /// -/// Like [`crate::reactor::Reactor`], this is a typed facade over a foreign -/// Python object. It does no validation of the object it wraps (the Python -/// side is type-checked by mypy), but it is the single place that names the -/// `HomeServer` API surface that Rust code depends on. +/// Like [`crate::reactor::Reactor`], this is a wrapper around a foreign Python +/// object. No validation is performed, on the assumption the Python side is +/// correctly typed. pub struct HomeServer(Py); impl<'a, 'py> FromPyObject<'a, 'py> for HomeServer { diff --git a/rust/src/reactor.rs b/rust/src/reactor.rs index db958d82b3..71d42fb355 100644 --- a/rust/src/reactor.rs +++ b/rust/src/reactor.rs @@ -19,10 +19,8 @@ use pyo3::{call::PyCallArgs, intern, prelude::*}; /// The Twisted reactor, as seen from Rust. /// -/// A typed facade over a foreign Python object. It does no validation of the -/// object it wraps (the Python side is type-checked by mypy), but it is the -/// single place that names the Twisted API surface that Rust code depends -/// on. +/// This is a wrapper around a foreign Python object. No validation is +/// performed, on the assumption the Python side is correctly typed. pub struct Reactor(Py); impl<'a, 'py> FromPyObject<'a, 'py> for Reactor {