Skip to content

Commit

Permalink
Fix (nightly) warning in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Jan 6, 2024
1 parent 9ed0d90 commit 60e859f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/userdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,12 @@ pub trait UserDataFields<'lua, T> {
/// # use mlua::{Lua, Result, UserData};
/// # fn main() -> Result<()> {
/// # let lua = Lua::new();
/// struct MyUserData(i32);
/// struct MyUserData;
///
/// impl UserData for MyUserData {}
///
/// // `MyUserData` now implements `IntoLua`:
/// lua.globals().set("myobject", MyUserData(123))?;
/// lua.globals().set("myobject", MyUserData)?;
///
/// lua.load("assert(type(myobject) == 'userdata')").exec()?;
/// # Ok(())
Expand Down

0 comments on commit 60e859f

Please sign in to comment.