Fix warnings when testing documentation

This commit is contained in:
Alex Orlenko
2025-04-05 23:44:25 +01:00
parent cf687a6ac6
commit 84efb8bf95
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ impl Function {
/// Ok(())
/// })?;
///
/// sleep.call_async(10).await?;
/// sleep.call_async::<()>(10).await?;
///
/// # Ok(())
/// # }
+2 -2
View File
@@ -621,7 +621,7 @@ impl Lua {
/// .into_function()?,
/// )?;
/// while co.status() == ThreadStatus::Resumable {
/// co.resume(())?;
/// co.resume::<()>(())?;
/// }
/// # Ok(())
/// # }
@@ -1835,7 +1835,7 @@ impl Lua {
/// fn main() -> Result<()> {
/// let lua = Lua::new();
/// lua.set_app_data("hello");
/// lua.create_function(hello)?.call(())?;
/// lua.create_function(hello)?.call::<()>(())?;
/// let s = lua.app_data_ref::<&str>().unwrap();
/// assert_eq!(*s, "world");
/// Ok(())
+1 -1
View File
@@ -366,7 +366,7 @@ impl Thread {
/// Ok(())
/// })?)?;
/// thread.sandbox()?;
/// thread.resume(())?;
/// thread.resume::<()>(())?;
///
/// // The global environment should be unchanged
/// assert_eq!(lua.globals().get::<Option<u32>>("var")?, None);