Skip to content

Commit

Permalink
update samp-rs to avoid ref aliasing
Browse files Browse the repository at this point in the history
  • Loading branch information
bmisiak committed Feb 27, 2024
1 parent f3df1fb commit 389f01f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [] }
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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));
}
}
Expand Down

0 comments on commit 389f01f

Please sign in to comment.