Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
catornot committed Oct 2, 2024
1 parent e183295 commit d2e5faa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/high/squirrel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl<T: 'static> UserData<T> {
}

/// Creates a new [`UserData<T>`] from boxed data
pub fn from_boxed(userdata: Box<T>) -> Self {
pub const fn from_boxed(userdata: Box<T>) -> Self {
Self(userdata)
}
}
Expand Down
9 changes: 3 additions & 6 deletions src/mid/engine/concommands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,9 @@ impl RegisterConCommands {
) -> ::std::os::raw::c_int,
) -> Result<*mut ConCommand, RegisterError> {
self.mid_register_concommand(name, callback, help_string, flags)
.map(move |command| {
unsafe {
(*command).m_pCompletionCallback = Some(completion_callback);
(*command).m_nCallbackFlags |= 0x3;
}
command
.inspect(move |command| unsafe {
(*(*command)).m_pCompletionCallback = Some(completion_callback);
(*(*command)).m_nCallbackFlags |= 0x3;
})
}
}
Expand Down

0 comments on commit d2e5faa

Please sign in to comment.