mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 21:58:20 +00:00
Make automatically the trait Into<Engine> conversions
This commit is contained in:
@@ -42,22 +42,12 @@ impl Default for Engine {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<engine_imp::Engine> for Engine {
|
||||
fn from(inner: engine_imp::Engine) -> Self {
|
||||
Self(inner)
|
||||
impl<T: Into<engine_imp::Engine>> From<T> for Engine {
|
||||
fn from(t: T) -> Self {
|
||||
Self(t.into())
|
||||
}
|
||||
}
|
||||
|
||||
// impl<P> Into<Engine> for P
|
||||
// where
|
||||
// P: Into<engine_imp::Engine>
|
||||
// {
|
||||
// fn into(self) -> Engine {
|
||||
// let inner_engine: engine_imp::Engine = self.into();
|
||||
// Engine(inner_engine)
|
||||
// }
|
||||
// }
|
||||
|
||||
/// A temporary handle to an [`Engine`]
|
||||
/// EngineRef can be used to build a [`Module`][wasmer::Module]
|
||||
/// It can be created directly with an [`Engine`]
|
||||
|
||||
@@ -51,18 +51,6 @@ pub(crate) fn default_engine() -> Engine {
|
||||
engine
|
||||
}
|
||||
|
||||
impl From<EngineBuilder> for crate::engine::Engine {
|
||||
fn from(builder: EngineBuilder) -> Self {
|
||||
Self(builder.into())
|
||||
}
|
||||
}
|
||||
|
||||
// impl From<CompilerConfig> for crate::engine::Engine {
|
||||
// fn from(compiler: CompilerConfig) -> Self {
|
||||
// Self(compiler.into())
|
||||
// }
|
||||
// }
|
||||
|
||||
/// The custom trait to access to all the `sys` function in the common
|
||||
/// engine.
|
||||
pub trait NativeEngineExt {
|
||||
|
||||
Reference in New Issue
Block a user