Skip to content

Commit 2b77158

Browse files
authored
Add TryClone and TryToOwned to our prelude (#12676)
* Add `TryClone` and `TryToOwned` to our prelude The non-`Try` versions are both in `std`'s prelude, so it makes sense to add them to our prelude. * fix warning
1 parent 601c8b9 commit 2b77158

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

crates/environ/src/prelude.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
//!
2020
//! and then `use crate::*` works as usual.
2121
22-
pub use crate::collections::{EntitySet, TryNew, try_new};
22+
pub use crate::collections::{
23+
EntitySet, TryClone, TryCollect, TryExtend, TryFromIterator, TryNew, TryToOwned, try_new,
24+
};
2325
pub use crate::error::{Context, Error, Result, bail, ensure, format_err};
2426
pub use alloc::borrow::ToOwned;
2527
pub use alloc::boxed::Box;
@@ -28,4 +30,3 @@ pub use alloc::string::{String, ToString};
2830
pub use alloc::vec;
2931
pub use alloc::vec::Vec;
3032
pub use wasmparser::collections::{IndexMap, IndexSet};
31-
pub use wasmtime_core::alloc::{TryCollect, TryExtend, TryFromIterator};

crates/wasmtime/src/runtime/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use wasmtime_environ::{
1212
PanicOnOom as _, Table, Tag, TypeTrace, VMSharedTypeIndex, WasmArrayType,
1313
WasmCompositeInnerType, WasmCompositeType, WasmFieldType, WasmFuncType, WasmHeapType,
1414
WasmRefType, WasmStorageType, WasmStructType, WasmSubType, WasmValType,
15-
collections::{TryClone as _, Vec as FallibleVec},
15+
collections::Vec as FallibleVec,
1616
};
1717

1818
pub(crate) mod matching;

0 commit comments

Comments
 (0)