Skip to content

Commit

Permalink
fix(cli): migrate to stable features of log crate (#9119)
Browse files Browse the repository at this point in the history
* fix(cli): migrate to stable features of `log` crate

* to_cow_str
  • Loading branch information
amrbashir authored Mar 7, 2024
1 parent b15948b commit 97a0514
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 42 deletions.
6 changes: 6 additions & 0 deletions .changes/log-stable-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'tauri-cli': 'patch:bug'
'tauri-bundler': 'patch:bug'
---

Fix compilation error due to dependency on unstable features of `log` crate.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tooling/bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tar = "0.4.40"
walkdir = "2"
handlebars = "4.5"
tempfile = "3.8.1"
log = { version = "0.4.20", features = ["kv_unstable"] }
log = { version = "0.4.21", features = ["kv"] }
dirs-next = "2.0"
os_pipe = "1"
ureq = { version = "2.9.1", default-features = false, features = [
Expand Down
74 changes: 37 additions & 37 deletions tooling/cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tooling/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ url = { version = "2.4", features = ["serde"] }
os_pipe = "1"
ignore = "0.4"
ctrlc = "3.4"
log = { version = "0.4.20", features = ["kv_unstable", "kv_unstable_std"] }
log = { version = "0.4.21", features = ["kv", "kv_std"] }
env_logger = "0.10.0"
icns = { package = "tauri-icns", version = "0.1" }
image = { version = "0.24", default-features = false, features = ["ico"] }
Expand Down
2 changes: 1 addition & 1 deletion tooling/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ where
.format(|f, record| {
let mut is_command_output = false;
if let Some(action) = record.key_values().get("action".into()) {
let action = action.to_str().unwrap();
let action = action.to_cow_str().unwrap();
is_command_output = action == "stdout" || action == "stderr";
if !is_command_output {
let mut action_style = f.style();
Expand Down

0 comments on commit 97a0514

Please sign in to comment.