Skip to content

Commit 0bc56e8

Browse files
authored
Use TryClone from the prelude (#12680)
1 parent 2b77158 commit 0bc56e8

File tree

6 files changed

+6
-16
lines changed

6 files changed

+6
-16
lines changed

crates/environ/src/gc.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ pub mod null;
1717

1818
use crate::{
1919
WasmArrayType, WasmCompositeInnerType, WasmCompositeType, WasmExnType, WasmStorageType,
20-
WasmStructType, WasmValType,
21-
collections::{self, TryClone},
22-
error::OutOfMemory,
23-
prelude::*,
20+
WasmStructType, WasmValType, collections, error::OutOfMemory, prelude::*,
2421
};
2522
use alloc::sync::Arc;
2623
use core::alloc::Layout;

crates/environ/src/string_pool.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::{
66
prelude::*,
77
};
88
use core::{fmt, mem, num::NonZeroU32};
9-
use wasmtime_core::alloc::TryClone;
109

1110
/// An interned string associated with a particular string in a `StringPool`.
1211
///

crates/environ/src/types.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
use crate::{
2-
PanicOnOom as _, Tunables, WasmResult,
3-
collections::{TryClone, TryCollect as _, TryCow, TryExtend},
4-
error::OutOfMemory,
5-
prelude::*,
2+
PanicOnOom as _, Tunables, WasmResult, collections::TryCow, error::OutOfMemory, prelude::*,
63
wasm_unsupported,
74
};
85
use alloc::boxed::Box;

crates/wasmtime/src/runtime/component/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#[cfg(feature = "component-model-async")]
44
use crate::component::ComponentType;
55
use crate::component::matching::InstanceType;
6-
use crate::{Engine, ExternType, FuncType};
6+
use crate::{Engine, ExternType, FuncType, prelude::*};
77
use alloc::sync::Arc;
88
use core::fmt;
99
use core::ops::Deref;
@@ -14,7 +14,7 @@ use wasmtime_environ::component::{
1414
TypeRecordIndex, TypeResourceTable, TypeResourceTableIndex, TypeResultIndex, TypeStreamIndex,
1515
TypeStreamTableIndex, TypeTupleIndex, TypeVariantIndex,
1616
};
17-
use wasmtime_environ::{PanicOnOom as _, PrimaryMap, collections::TryClone as _};
17+
use wasmtime_environ::{PanicOnOom as _, PrimaryMap};
1818

1919
pub use crate::component::resources::ResourceType;
2020

crates/wasmtime/src/runtime/linker.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ use core::future::Future;
1313
use core::marker;
1414
use core::mem::MaybeUninit;
1515
use log::warn;
16-
use wasmtime_environ::{
17-
Atom, PanicOnOom as _, StringPool,
18-
collections::{HashMap, TryClone},
19-
};
16+
use wasmtime_environ::{Atom, PanicOnOom as _, StringPool, collections::HashMap};
2017

2118
/// Structure used to link wasm modules/instances together.
2219
///

crates/wasmtime/src/runtime/type_registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use wasmtime_core::slab::{Id as SlabId, Slab};
2525
use wasmtime_environ::{
2626
EngineOrModuleTypeIndex, EntityRef, GcLayout, ModuleInternedTypeIndex, ModuleTypes,
2727
PanicOnOom as _, TypeTrace, Undo, VMSharedTypeIndex, WasmRecGroup, WasmSubType,
28-
collections::{HashSet, PrimaryMap, SecondaryMap, TryClone, TryCow, Vec},
28+
collections::{HashSet, PrimaryMap, SecondaryMap, TryCow, Vec},
2929
iter_entity_range,
3030
packed_option::{PackedOption, ReservedValue},
3131
};

0 commit comments

Comments
 (0)