Skip to content

Commit 39b3af2

Browse files
committed
Fix warnings when testing documentation
1 parent b805939 commit 39b3af2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/function.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl Function {
146146
/// Ok(())
147147
/// })?;
148148
///
149-
/// sleep.call_async(10).await?;
149+
/// sleep.call_async::<()>(10).await?;
150150
///
151151
/// # Ok(())
152152
/// # }

src/state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ impl Lua {
639639
/// .into_function()?,
640640
/// )?;
641641
/// while co.status() == ThreadStatus::Resumable {
642-
/// co.resume(())?;
642+
/// co.resume::<()>(())?;
643643
/// }
644644
/// # Ok(())
645645
/// # }
@@ -1904,7 +1904,7 @@ impl Lua {
19041904
/// fn main() -> Result<()> {
19051905
/// let lua = Lua::new();
19061906
/// lua.set_app_data("hello");
1907-
/// lua.create_function(hello)?.call(())?;
1907+
/// lua.create_function(hello)?.call::<()>(())?;
19081908
/// let s = lua.app_data_ref::<&str>().unwrap();
19091909
/// assert_eq!(*s, "world");
19101910
/// Ok(())

src/thread.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ impl Thread {
445445
/// Ok(())
446446
/// })?)?;
447447
/// thread.sandbox()?;
448-
/// thread.resume(())?;
448+
/// thread.resume::<()>(())?;
449449
///
450450
/// // The global environment should be unchanged
451451
/// assert_eq!(lua.globals().get::<Option<u32>>("var")?, None);

0 commit comments

Comments
 (0)