Skip to content

Commit

Permalink
style: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
yisibl committed Oct 15, 2021
1 parent 28340c7 commit a088337
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/fonts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use crate::options::*;
use log::{debug, error, warn};
use usvg::fontdb::Database;
use log::{warn, debug, error};

/// Loads fonts.
pub fn load_fonts(font_options: &JsFontOptions) -> Database {
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ fn render(ctx: napi::CallContext) -> napi::Result<napi::JsBuffer> {
options::JsOptions::default()
};

let _ = env_logger::builder().filter_level(js_options.log_level).try_init();
let _ = env_logger::builder()
.filter_level(js_options.log_level)
.try_init();

// Parse the background
let background =
Expand Down
7 changes: 2 additions & 5 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ enum FitToDef {
}

#[derive(Deserialize)]
#[serde(
rename_all = "lowercase",
remote = "log::LevelFilter"
)]
#[serde(rename_all = "lowercase", remote = "log::LevelFilter")]
enum LogLevelDef {
Off,
Error,
Expand Down Expand Up @@ -116,7 +113,7 @@ impl Default for JsOptions {
fit_to: usvg::FitTo::Original,
background: None,
crop: JsCropOptions::default(),
log_level: log::LevelFilter::Error
log_level: log::LevelFilter::Error,
}
}
}
Expand Down

0 comments on commit a088337

Please sign in to comment.