Merge use.

This commit is contained in:
Stephen Chung
2022-04-13 10:35:10 +08:00
parent c5015d5e86
commit 7788e1058a
10 changed files with 32 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
use crate::{Engine, Module, ModuleResolver, Position, RhaiResultOf, Shared, ERR};
use std::ops::AddAssign;
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
use std::{ops::AddAssign, vec::IntoIter};
/// [Module] resolution service that holds a collection of module resolvers,
/// to be searched in sequential order.
@@ -108,7 +108,7 @@ impl ModuleResolversCollection {
impl IntoIterator for ModuleResolversCollection {
type Item = Box<dyn ModuleResolver>;
type IntoIter = std::vec::IntoIter<Box<dyn ModuleResolver>>;
type IntoIter = IntoIter<Box<dyn ModuleResolver>>;
#[inline(always)]
fn into_iter(self) -> Self::IntoIter {

View File

@@ -3,7 +3,7 @@ use crate::{
};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
use std::{collections::BTreeMap, ops::AddAssign};
use std::{collections::btree_map::IntoIter, collections::BTreeMap, ops::AddAssign};
/// A static [module][Module] resolution service that serves [modules][Module] added into it.
///
@@ -120,7 +120,7 @@ impl StaticModuleResolver {
impl IntoIterator for StaticModuleResolver {
type Item = (Identifier, Shared<Module>);
type IntoIter = std::collections::btree_map::IntoIter<SmartString, Shared<Module>>;
type IntoIter = IntoIter<SmartString, Shared<Module>>;
fn into_iter(self) -> Self::IntoIter {
self.0.into_iter()