Avoid naming variables str
This renames variables named `str` to other names, to make sure `str` always refers to a type. It's confusing to read code where `str` (or another standard type name) is used as an identifier. It also produces misleading syntax highlighting.
This commit is contained in:
parent
fb546ee09b
commit
bb6bbfa13f
10 changed files with 34 additions and 34 deletions
|
@ -130,11 +130,11 @@ pub fn init_logger(cfg: LoggerConfig) -> Result<(), Error> {
|
|||
|
||||
let subscriber = tracing_subscriber::Registry::default().with(filter).with(layer);
|
||||
match cfg.backtrace {
|
||||
Ok(str) => {
|
||||
Ok(backtrace_target) => {
|
||||
let fmt_layer = tracing_subscriber::fmt::layer()
|
||||
.with_writer(io::stderr)
|
||||
.without_time()
|
||||
.event_format(BacktraceFormatter { backtrace_target: str });
|
||||
.event_format(BacktraceFormatter { backtrace_target });
|
||||
let subscriber = subscriber.with(fmt_layer);
|
||||
tracing::subscriber::set_global_default(subscriber).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue