mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Fix warnings when testing documentation
This commit is contained in:
+1
-1
@@ -146,7 +146,7 @@ impl Function {
|
||||
/// Ok(())
|
||||
/// })?;
|
||||
///
|
||||
/// sleep.call_async(10).await?;
|
||||
/// sleep.call_async::<()>(10).await?;
|
||||
///
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
|
||||
+2
-2
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user