From 39b3af2ff2b95b92ceb7b7d37611d730dd1d5c14 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Sat, 5 Apr 2025 23:44:25 +0100 Subject: [PATCH] Fix warnings when testing documentation --- src/function.rs | 2 +- src/state.rs | 4 ++-- src/thread.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/function.rs b/src/function.rs index 7e0a6d9..08dbc83 100644 --- a/src/function.rs +++ b/src/function.rs @@ -146,7 +146,7 @@ impl Function { /// Ok(()) /// })?; /// - /// sleep.call_async(10).await?; + /// sleep.call_async::<()>(10).await?; /// /// # Ok(()) /// # } diff --git a/src/state.rs b/src/state.rs index c799e5b..0292158 100644 --- a/src/state.rs +++ b/src/state.rs @@ -639,7 +639,7 @@ impl Lua { /// .into_function()?, /// )?; /// while co.status() == ThreadStatus::Resumable { - /// co.resume(())?; + /// co.resume::<()>(())?; /// } /// # Ok(()) /// # } @@ -1904,7 +1904,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(()) diff --git a/src/thread.rs b/src/thread.rs index 72ddac3..14ff04a 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -445,7 +445,7 @@ impl Thread { /// Ok(()) /// })?)?; /// thread.sandbox()?; - /// thread.resume(())?; + /// thread.resume::<()>(())?; /// /// // The global environment should be unchanged /// assert_eq!(lua.globals().get::>("var")?, None);