Minor refactor.

This commit is contained in:
Stephen Chung
2022-03-09 09:25:55 +08:00
parent 89426f8b3a
commit 1e4abd012c
11 changed files with 86 additions and 74 deletions

View File

@@ -4,19 +4,14 @@ use crate::eval::{calc_index, calc_offset_len};
use crate::plugin::*;
use crate::{
def_package, Array, Blob, Dynamic, ExclusiveRange, InclusiveRange, NativeCallContext, Position,
RhaiResultOf, INT,
RhaiResultOf, INT, INT_BYTES,
};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
use std::{any::TypeId, mem};
#[cfg(not(feature = "no_float"))]
use crate::FLOAT;
const INT_BYTES: usize = mem::size_of::<INT>();
#[cfg(not(feature = "no_float"))]
const FLOAT_BYTES: usize = mem::size_of::<FLOAT>();
use crate::{FLOAT, FLOAT_BYTES};
def_package! {
/// Package of basic BLOB utilities.