Skip to content

Commit

Permalink
fix: clippy fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Dec 9, 2023
1 parent c209adc commit 3ca2fce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions crates/dojo-lang/src/scarb_internal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ pub fn compile_workspace(config: &Config, opts: CompileOpts) -> Result<()> {
for unit in compilation_units {
let mut db = build_scarb_root_database(&unit).unwrap();

match ws.config().compilers().compile(unit.clone(), &mut (db), &ws) {
Err(err) => ws.config().ui().anyhow(&err),
Ok(_) => (),
if let Err(err) = ws.config().compilers().compile(unit.clone(), &mut (db), &ws) {
ws.config().ui().anyhow(&err)
}
}

Expand Down
10 changes: 4 additions & 6 deletions crates/dojo-test-utils/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ fn main() {
use camino::{Utf8Path, Utf8PathBuf};
use dojo_lang::compiler::DojoCompiler;
use dojo_lang::plugin::CairoPluginRepository;
use dojo_lang::scarb_internal::compile_workspace;
use scarb::compiler::CompilerRepository;
use scarb::core::{Config, TargetKind};
use scarb::ops::{self, CompileOpts};
use scarb::ops::CompileOpts;
use scarb_ui::Verbosity;

let project_paths = ["../../examples/spawn-and-move", "../torii/graphql/src/tests/types-test"];
Expand Down Expand Up @@ -39,12 +40,9 @@ fn main() {
.build()
.unwrap();

let ws = ops::read_workspace(config.manifest_path(), &config).unwrap();
let packages = ws.members().map(|p| p.id).collect();
ops::compile(
packages,
compile_workspace(
&config,
CompileOpts { include_targets: vec![], exclude_targets: vec![TargetKind::TEST] },
&ws,
)
.unwrap();
}
Expand Down

0 comments on commit 3ca2fce

Please sign in to comment.