Skip to content

Commit

Permalink
refactor: Lints
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow3aaa committed Jul 23, 2024
1 parent a35b136 commit bf3f0aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/framework/extension/api/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub fn set_policy_freq_offset(policy: i32, offset: isize) -> mlua::Result<()> {
.get()
.unwrap()
.get(&policy)
.ok_or(mlua::Error::runtime("Policy Not Found!"))?
.ok_or_else(|| mlua::Error::runtime("Policy Not Found!"))?
.store(offset, Ordering::Release);
Ok(())
}
2 changes: 1 addition & 1 deletion src/framework/extension/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ fn load_extensions() -> Result<ExtensionMap> {
lua.globals().set(
"set_policy_freq_offset",
lua.create_function(|_, (policy, offset): (i32, isize)| {
v1::set_policy_freq_offset(policy, offset);
v1::set_policy_freq_offset(policy, offset)?;
Ok(())
})?,
)?;
Expand Down

0 comments on commit bf3f0aa

Please sign in to comment.