From d0961fed4673e48062131003ce62e09e0432f099 Mon Sep 17 00:00:00 2001 From: Matthew Broadway Date: Sat, 2 Nov 2024 22:41:00 +0000 Subject: [PATCH] small fix to guide --- guide/src/class/metaclass.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/src/class/metaclass.md b/guide/src/class/metaclass.md index 8e81b581e92..fb62bb2d479 100644 --- a/guide/src/class/metaclass.md +++ b/guide/src/class/metaclass.md @@ -30,7 +30,7 @@ impl MyMetaclass { _args: Bound<'_, PyTuple>, _kwargs: Option>, ) -> PyResult<()> { - slf.as_any().setattr("some_var", 123)?; + slf.borrow_mut().counter = 5; Ok(()) }