diff --git a/src/fonts.rs b/src/fonts.rs index 73ea12b4..a15bce83 100644 --- a/src/fonts.rs +++ b/src/fonts.rs @@ -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 { diff --git a/src/lib.rs b/src/lib.rs index 2fe590e0..b9c8cc86 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,7 +30,9 @@ fn render(ctx: napi::CallContext) -> napi::Result { 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 = diff --git a/src/options.rs b/src/options.rs index 5de9f45a..eaf34200 100644 --- a/src/options.rs +++ b/src/options.rs @@ -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, @@ -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, } } }