From 3d5261640d293c13dbe575c4fdee3eb7746a1da3 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Fri, 6 Jun 2025 23:25:36 +0100 Subject: [PATCH] Fix doc warnings --- src/state.rs | 4 ++-- src/thread.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/state.rs b/src/state.rs index 4be9ba4..978b1dc 100644 --- a/src/state.rs +++ b/src/state.rs @@ -377,7 +377,7 @@ impl Lua { /// /// This is similar to setting the [`package.preload[modname]`] field. /// - /// [`package.preload[modname]`]: https://www.lua.org/manual/5.4/manual.html#pdf-package.preload + /// [`package.preload[modname]`]: #[cfg(not(feature = "luau"))] #[cfg_attr(docsrs, doc(cfg(not(feature = "luau"))))] pub fn preload_module(&self, modname: &str, func: Function) -> Result<()> { @@ -636,7 +636,7 @@ impl Lua { /// Also this can be used to implement continuous execution limits by instructing Luau VM to /// yield by returning [`VmState::Yield`]. /// - /// This is similar to [`Lua::set_hook`] but in more simplified form. + /// This is similar to `Lua::set_hook` but in more simplified form. /// /// # Example /// diff --git a/src/thread.rs b/src/thread.rs index da7962b..520f063 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -263,6 +263,8 @@ impl Thread { /// You can have multiple hooks for different threads. /// /// To remove a hook call [`Thread::remove_hook`]. + /// + /// [`Lua::set_hook`]: crate::Lua::set_hook #[cfg(not(feature = "luau"))] #[cfg_attr(docsrs, doc(cfg(not(feature = "luau"))))] pub fn set_hook(&self, triggers: HookTriggers, callback: F) -> Result<()>