chore(deps): bump clap to latest rc

This commit is contained in:
LGUG2Z
2021-12-31 08:33:29 -08:00
parent 5e3f1cbb44
commit e2ae9b1207
7 changed files with 73 additions and 87 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ edition = "2021"
komorebi-core = { path = "../komorebi-core" }
bitflags = "1"
clap = "3.0.0-beta.5"
clap = { version = "3.0.0-rc.11", features = ["derive"] }
color-eyre = "0.5"
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
+17 -14
View File
@@ -145,20 +145,23 @@ fn setup() -> Result<(WorkerGuard, WorkerGuard)> {
// occurred to be recorded.
std::panic::set_hook(Box::new(|panic| {
// If the panic has a source location, record it as structured fields.
if let Some(location) = panic.location() {
// On nightly Rust, where the `PanicInfo` type also exposes a
// `message()` method returning just the message, we could record
// just the message instead of the entire `fmt::Display`
// implementation, avoiding the duplciated location
tracing::error!(
message = %panic,
panic.file = location.file(),
panic.line = location.line(),
panic.column = location.column(),
);
} else {
tracing::error!(message = %panic);
}
panic.location().map_or_else(
|| {
tracing::error!(message = %panic);
},
|location| {
// On nightly Rust, where the `PanicInfo` type also exposes a
// `message()` method returning just the message, we could record
// just the message instead of the entire `fmt::Display`
// implementation, avoiding the duplciated location
tracing::error!(
message = %panic,
panic.file = location.file(),
panic.line = location.line(),
panic.column = location.column(),
);
},
);
}));
Ok((guard, color_guard))
+1 -1
View File
@@ -297,7 +297,7 @@ impl WindowManager {
if matches!(axis, Axis::Horizontal) {
let percentage = custom
.primary_width_percentage()
.unwrap_or_else(|| 100 / custom.len());
.unwrap_or(100 / custom.len());
match sizing {
Sizing::Increase => custom.set_primary_width_percentage(percentage + 5),