Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjj27 committed Nov 6, 2020
1 parent bc6d841 commit 7c3ef4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/fmt/writer/termcolor/shim_impl.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::io;

use crate::fmt::{Target, WriteStyle};
#[cfg(all(target_arch="wasm32", target_vendor="unknown"))]
#[cfg(all(target_arch = "wasm32", target_vendor = "unknown"))]
use crate::fmt::writer::web;
use crate::fmt::{Target, WriteStyle};

pub(in crate::fmt::writer) mod glob {}

Expand Down Expand Up @@ -35,10 +35,10 @@ impl BufferWriter {
// This is so their output can be captured by `cargo test`
let log = String::from_utf8_lossy(&buf.0);

#[cfg(all(target_arch="wasm32", target_vendor="unknown"))]
#[cfg(all(target_arch = "wasm32", target_vendor = "unknown"))]
web::print(&log, self.target);

#[cfg(not(all(target_arch="wasm32", target_vendor="unknown")))]
#[cfg(not(all(target_arch = "wasm32", target_vendor = "unknown")))]
match self.target {
Target::Stderr => eprint!("{}", log),
Target::Stdout => print!("{}", log),
Expand Down
2 changes: 1 addition & 1 deletion src/fmt/writer/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! Here use the one-param logging functions, all messages should be transformed
//! to string before passing to the functions. Note that we only need this
//! module for `wasm32-unknown-unknown` target
#![cfg(all(target_arch="wasm32", target_vendor="unknown"))]
#![cfg(all(target_arch = "wasm32", target_vendor = "unknown"))]

// use log::Level;
use wasm_bindgen::prelude::*;
Expand Down

0 comments on commit 7c3ef4a

Please sign in to comment.