Small fixups.
This commit is contained in:
@@ -18,7 +18,6 @@ use crate::stdlib::{
|
||||
boxed::Box,
|
||||
collections::HashMap,
|
||||
fmt,
|
||||
hash::Hash,
|
||||
string::String,
|
||||
vec::Vec,
|
||||
};
|
||||
|
@@ -710,7 +710,7 @@ impl Engine {
|
||||
/// This function restores the first argument that was replaced by `normalize_first_arg_of_method_call`.
|
||||
fn restore_first_arg<'a>(old_this_ptr: Option<&'a mut Dynamic>, args: &mut FnCallArgs<'a>) {
|
||||
if let Some(this_pointer) = old_this_ptr {
|
||||
mem::replace(args.get_mut(0).unwrap(), this_pointer);
|
||||
args[0] = this_pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -30,6 +30,7 @@ use crate::stdlib::{
|
||||
};
|
||||
|
||||
#[cfg(not(feature = "no_std"))]
|
||||
#[cfg(feature = "sync")]
|
||||
use crate::stdlib::sync::RwLock;
|
||||
|
||||
/// Return type of module-level Rust function.
|
||||
|
@@ -8,6 +8,7 @@ use crate::token::Position;
|
||||
use crate::parser::FLOAT;
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
#[cfg(feature = "no_std")]
|
||||
use num_traits::*;
|
||||
|
||||
use num_traits::{
|
||||
|
@@ -7,6 +7,7 @@ use crate::token::Position;
|
||||
use crate::parser::FLOAT;
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
#[cfg(feature = "no_std")]
|
||||
use num_traits::*;
|
||||
|
||||
use crate::stdlib::{boxed::Box, format, i32, i64};
|
||||
|
Reference in New Issue
Block a user