remove intermediate vars

This commit is contained in:
Oliver Schneider 2016-06-01 18:42:57 +02:00
parent af41c54301
commit fee3a2c1a7
No known key found for this signature in database
GPG Key ID: 56D6EEA0FC67AC46

View File

@ -45,13 +45,11 @@ fn init_logger() {
let format = |record: &log::LogRecord| {
// prepend spaces to indent the final string
let indentation = log_settings::settings().indentation;
let depth = indentation / NSPACES;
let indentation = indentation % NSPACES;
format!("{lvl}:{module}{depth:2}{indent:<indentation$}{text}",
format!("{lvl}:{module}{depth:2}{indent:<indentation$} {text}",
lvl = record.level(),
module = record.location().module_path(),
depth = depth,
indentation = indentation,
depth = indentation / NSPACES,
indentation = indentation % NSPACES,
indent = "",
text = record.args())
};