Skip to content

Commit

Permalink
Fixed linting and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jul 28, 2022
1 parent 2f43321 commit f2ec550
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions lib/cli-compiler/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ impl CompilerOptions {
compiler_config: Box<dyn CompilerConfig>,
) -> Result<EngineBuilder> {
let features = self.get_features(compiler_config.default_features_for_target(&target))?;
let engine: EngineBuilder =
EngineBuilder::new(compiler_config, Some(target), Some(features));
let engine: EngineBuilder = EngineBuilder::new(compiler_config)
.set_target(Some(target))
.set_features(Some(features));

Ok(engine)
}
Expand Down
6 changes: 0 additions & 6 deletions lib/compiler/src/engine/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,3 @@ impl EngineBuilder {
self.target.as_ref()
}
}

impl Into<Engine> for EngineBuilder {
fn into(self) -> Engine {
self.engine()
}
}
12 changes: 9 additions & 3 deletions lib/compiler/src/engine/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,15 @@ impl EngineInner {
}
}

impl Into<Engine> for Box<dyn CompilerConfig> {
fn into(self) -> Engine {
EngineBuilder::new(self).engine()
impl From<Box<dyn CompilerConfig>> for Engine {
fn from(config: Box<dyn CompilerConfig>) -> Self {
EngineBuilder::new(config).engine()
}
}

impl From<EngineBuilder> for Engine {
fn from(engine_builder: EngineBuilder) -> Self {
engine_builder.engine()
}
}

Expand Down

0 comments on commit f2ec550

Please sign in to comment.