Skip to content

Commit aa0e1f7

Browse files
committed
Run Rustfmt.
1 parent 74e1740 commit aa0e1f7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/lib.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,40 @@
1818
//! ```
1919
//!
2020
//! # Log Levels
21-
//!
21+
//!
2222
//! Rust's log levels map to the browser's console log in the following way.
23-
//!
23+
//!
2424
//! | Rust | Web Console |
2525
//! |------------|-------------------|
2626
//! | `trace!()` | `console.debug()` |
2727
//! | `debug!()` | `console.log()` |
2828
//! | `info!()` | `console.info()` |
2929
//! | `warn!()` | `console.warn()` |
3030
//! | `error!()` | `console.error()` |
31-
//!
31+
//!
3232
//! # Getting Fancy
3333
//!
3434
//! The feature set provided by this crate is intentionally very basic. If you need more flexible
3535
//! formatting of log messages (timestamps, file and line info, etc.) this crate can be used with
3636
//! the [`fern`] logger via the [`console_log::log`] function.
3737
//!
3838
//! # Code Size
39-
//!
39+
//!
4040
//! [Twiggy] reports this library adding about 180Kb to the size of a minimal wasm binary in a
4141
//! debug build. If you want to avoid this, mark the library as optional and conditionally
4242
//! initialize it in your code for non-release builds.
43-
//!
43+
//!
4444
//! `Cargo.toml`
4545
//! ```toml
4646
//! [dependencies]
4747
//! cfg_if = "0.1"
4848
//! log = "0.4"
4949
//! console_log = { version = "0.1", optional = true }
50-
//!
50+
//!
5151
//! [features]
5252
//! default = ["console_log"]
5353
//! ```
54-
//!
54+
//!
5555
//! `lib.rs`
5656
//! ```rust,ignore
5757
//! use wasm_bindgen::prelude::*;
@@ -67,24 +67,24 @@
6767
//! fn init_log() {}
6868
//! }
6969
//! }
70-
//!
70+
//!
7171
//! #[wasm_bindgen]
7272
//! pub fn main() {
7373
//! init_log();
7474
//! // ...
7575
//! }
7676
//! ```
77-
//!
77+
//!
7878
//! # Limitations
79-
//!
79+
//!
8080
//! The file and line number information associated with the log messages reports locations from
8181
//! the shims generated by `wasm-bindgen`, not the location of the logger call.
8282
//!
8383
//! [Twiggy]: https://github.com/rustwasm/twiggy
8484
//! [`console_log::log`]: fn.log.html
8585
//! [`fern`]: https://docs.rs/fern
8686
87-
use log::{Log, Level, Record, Metadata, SetLoggerError};
87+
use log::{Level, Log, Metadata, Record, SetLoggerError};
8888
use web_sys::console;
8989

9090
static LOGGER: WebConsoleLogger = WebConsoleLogger {};

0 commit comments

Comments
 (0)