From d906405818a9eddf78d328eb823f8830224de0d6 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Wed, 18 Aug 2021 18:49:17 +0100 Subject: Simplify interface of `hook::HookTriggers` --- src/lua.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lua.rs') diff --git a/src/lua.rs b/src/lua.rs index b799161..98b2fb2 100644 --- a/src/lua.rs +++ b/src/lua.rs @@ -628,9 +628,7 @@ impl Lua { /// # use mlua::{Lua, HookTriggers, Result}; /// # fn main() -> Result<()> { /// let lua = Lua::new(); - /// lua.set_hook(HookTriggers { - /// every_line: true, ..Default::default() - /// }, |_lua, debug| { + /// lua.set_hook(HookTriggers::every_line(), |_lua, debug| { /// println!("line {}", debug.curr_line()); /// Ok(()) /// })?; -- cgit v1.2.3