diff --git a/Cargo.lock b/Cargo.lock index cadff05..907df01 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "samp" version = "0.1.3" -source = "git+https://github.com/bmisiak/samp-sdk.git?rev=2a509721bc442724922076a4ae79b137708ca738#2a509721bc442724922076a4ae79b137708ca738" +source = "git+https://github.com/bmisiak/samp-sdk.git?rev=41e94ed94ee83667ff1055590d4ec6e3c290371b#41e94ed94ee83667ff1055590d4ec6e3c290371b" dependencies = [ "fern", "samp-codegen", @@ -131,7 +131,7 @@ dependencies = [ [[package]] name = "samp-codegen" version = "0.1.2" -source = "git+https://github.com/bmisiak/samp-sdk.git?rev=2a509721bc442724922076a4ae79b137708ca738#2a509721bc442724922076a4ae79b137708ca738" +source = "git+https://github.com/bmisiak/samp-sdk.git?rev=41e94ed94ee83667ff1055590d4ec6e3c290371b#41e94ed94ee83667ff1055590d4ec6e3c290371b" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.12", @@ -155,7 +155,7 @@ dependencies = [ [[package]] name = "samp-sdk" version = "0.9.2" -source = "git+https://github.com/bmisiak/samp-sdk.git?rev=2a509721bc442724922076a4ae79b137708ca738#2a509721bc442724922076a4ae79b137708ca738" +source = "git+https://github.com/bmisiak/samp-sdk.git?rev=41e94ed94ee83667ff1055590d4ec6e3c290371b#41e94ed94ee83667ff1055590d4ec6e3c290371b" dependencies = [ "bitflags", ] diff --git a/Cargo.toml b/Cargo.toml index c3a0c71..f68d350 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ publish = false crate-type = ["cdylib"] [dependencies] -samp = { git = "https://github.com/bmisiak/samp-sdk.git", rev = "2a509721bc442724922076a4ae79b137708ca738" } +samp = { git = "https://github.com/bmisiak/samp-sdk.git", rev = "41e94ed94ee83667ff1055590d4ec6e3c290371b" } slab = "0.4.2" log = "0.4.6" fern = { version = "0.6", features = [] } diff --git a/src/lib.rs b/src/lib.rs index 4d6091a..8af3979 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -123,13 +123,13 @@ enum TimerError { } impl SampPlugin for PreciseTimers { - fn on_load(&mut self) { + fn on_load(&self) { info!("samp-precise-timers v3 (c) Brian Misiak loaded correctly."); } #[allow(clippy::inline_always)] #[inline(always)] - fn process_tick(&mut self) { + fn process_tick(&self) { let now = Instant::now(); while let Some(due @ NextDue { key, .. }) = next_timer_due_for_triggering(now) { @@ -147,7 +147,7 @@ impl SampPlugin for PreciseTimers { } } - fn on_amx_unload(&mut self, unloaded_amx: &Amx) { + fn on_amx_unload(&self, unloaded_amx: &Amx) { remove_timers(|timer| timer.was_scheduled_by_amx(unloaded_amx)); } }