Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bmisiak committed Jul 22, 2024
1 parent 296d241 commit 54db64f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/amx_arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use samp::{
prelude::AmxString,
};
use snafu::{ensure, OptionExt, ResultExt};
use std::{convert::TryInto, num::TryFromIntError, pin::Pin};
use std::{convert::TryInto, num::TryFromIntError};

/// These are the types of arguments the plugin supports for passing on to the callback.
#[derive(Debug, Clone)]
Expand Down Expand Up @@ -92,7 +92,7 @@ impl VariadicAmxArguments {
let letters = args.next::<AmxString>().context(MissingTypeLetters)?.to_bytes();
let expected = letters.len();
let received = args.count() - non_variadic_args;
ensure!(expected == received, MismatchedAmountOfArgs { expected, received, letters });
ensure!(expected == received, MismatchedAmountOfArgs { received, expected, letters });
Ok(letters.into_iter())
}

Expand Down Expand Up @@ -134,7 +134,7 @@ impl VariadicAmxArguments {
amx: amx.clone(),
callback_idx,
allocator_builder: |amx| {
let allocator = amx.allocator();
let allocator: Allocator = amx.allocator();
for param in self.inner.iter().rev() {
match param {
PassedArgument::PrimitiveCell(cell_value) => {
Expand Down
2 changes: 0 additions & 2 deletions src/scheduling.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use std::{cell::RefCell, time::Instant};

use fnv::FnvHashSet;
use samp::error::AmxError;
use slab::Slab;
use snafu::{ensure, OptionExt, Snafu};

use crate::{
amx_arguments::StackedCallback,
schedule::{Repeat, Schedule},
timer::Timer,
};
Expand Down

0 comments on commit 54db64f

Please sign in to comment.