From: Oliver Schneider Date: Wed, 1 Jun 2016 15:58:50 +0000 (+0200) Subject: use a number for the maximum indentation instead of relying on str::len() X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b7df4fdc75f208ced6d8ebec6d8f44f0bd5a6102;p=rust.git use a number for the maximum indentation instead of relying on str::len() --- diff --git a/src/bin/miri.rs b/src/bin/miri.rs index 8039cd18f82..85e4f634869 100644 --- a/src/bin/miri.rs +++ b/src/bin/miri.rs @@ -44,8 +44,8 @@ fn init_logger() { let format = |record: &log::LogRecord| { // prepend spaces to indent the final string let indentation = log_settings::settings().indentation; - let spaces = " | | | | | | | | "; - let indentation = &spaces[..std::cmp::min(indentation, spaces.len())]; + let spaces = " | | | | | | | | |"; + let indentation = &spaces[..std::cmp::min(indentation, 44)]; format!("{}:{}|{} {}", record.level(), record.location().module_path(), indentation, record.args()) };