Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sasial-dev committed Dec 26, 2023
1 parent acb14aa commit f69bbaf
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions zap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ use wasm_bindgen::prelude::*;
#[cfg(not(target_arch = "wasm32"))]
use codespan_reporting::diagnostic::Diagnostic;
#[cfg(target_arch = "wasm32")]
use codespan_reporting::{term::{termcolor::NoColor, self}, files::SimpleFile};
use codespan_reporting::{
files::SimpleFile,
term::{self, termcolor::NoColor},
};

#[cfg(not(target_arch = "wasm32"))]
use std::path::PathBuf;
Expand Down Expand Up @@ -87,14 +90,14 @@ pub fn run(input: &str) -> Return {

let mut writer = NoColor::new(Vec::new());

let file = SimpleFile::new("input.zap", input);
let term_config = term::Config::default();
let file = SimpleFile::new("input.zap", input);
let term_config = term::Config::default();

for diagnostic in diagnostics {
term::emit(&mut writer, &term_config, &file, &diagnostic).unwrap();
}
for diagnostic in diagnostics {
term::emit(&mut writer, &term_config, &file, &diagnostic).unwrap();
}

let diagnostics = String::from_utf8(writer.into_inner()).unwrap();
let diagnostics = String::from_utf8(writer.into_inner()).unwrap();

if let Some(config) = config {
Return {
Expand Down

0 comments on commit f69bbaf

Please sign in to comment.