diff --git a/crates/weechat/src/infolist.rs b/crates/weechat/src/infolist.rs index cfec14d..c3164dc 100644 --- a/crates/weechat/src/infolist.rs +++ b/crates/weechat/src/infolist.rs @@ -97,7 +97,7 @@ impl<'a> InfolistItem<'a> { unsafe { infolist_integer(self.ptr, name.as_ptr()) } } - fn string(&'a self, name: &str) -> Option> { + fn string(&self, name: &str) -> Option> { let name = LossyCString::new(name); let infolist_string = self.weechat.get().infolist_string.unwrap(); diff --git a/crates/weechat/src/weechat.rs b/crates/weechat/src/weechat.rs index e35a0b9..b43c784 100644 --- a/crates/weechat/src/weechat.rs +++ b/crates/weechat/src/weechat.rs @@ -4,7 +4,7 @@ use std::future::Future; use std::{ ffi::{CStr, CString}, - panic::PanicInfo, + panic::PanicHookInfo, path::PathBuf, ptr, vec, }; @@ -139,7 +139,7 @@ impl Weechat { Weechat { ptr } } - fn panic_hook(info: &PanicInfo) { + fn panic_hook(info: &PanicHookInfo) { let current_thread = std::thread::current(); let weechat_thread = Weechat::thread_id(); @@ -287,6 +287,7 @@ impl Weechat { fn thread_id() -> std::thread::ThreadId { *unsafe { + #[allow(static_mut_refs)] WEECHAT_THREAD_ID.as_ref().expect( "Weechat main thread ID wasn't found, plugin \ wasn't correctly initialized", @@ -295,6 +296,7 @@ impl Weechat { } pub(crate) fn check_thread() { + #[allow(static_mut_refs)] let weechat_thread_id = unsafe { WEECHAT_THREAD_ID.as_ref().expect( "Weechat main thread ID wasn't found, plugin \