From 84efb8bf9502c9e680fa67f20c0824483aa7ea9b 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 aa16230..a1944dc 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 3885089..2c6dbd8 100644 --- a/src/state.rs +++ b/src/state.rs @@ -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(()) diff --git a/src/thread.rs b/src/thread.rs index e351252..35e1ee3 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -366,7 +366,7 @@ impl Thread { /// Ok(()) /// })?)?; /// thread.sandbox()?; - /// thread.resume(())?; + /// thread.resume::<()>(())?; /// /// // The global environment should be unchanged /// assert_eq!(lua.globals().get::>("var")?, None);