diff --git a/src/amx_arguments.rs b/src/amx_arguments.rs index d7c7986..76d16d2 100644 --- a/src/amx_arguments.rs +++ b/src/amx_arguments.rs @@ -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)] @@ -92,7 +92,7 @@ impl VariadicAmxArguments { let letters = args.next::().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()) } @@ -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) => { diff --git a/src/scheduling.rs b/src/scheduling.rs index 6753adb..a46d702 100644 --- a/src/scheduling.rs +++ b/src/scheduling.rs @@ -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, };