mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
Use from_utf8_lossy instead of from_utf8 everywhere
This commit is contained in:
parent
694ea0f351
commit
7706ae3cfe
3 changed files with 12 additions and 12 deletions
|
@ -98,7 +98,7 @@ impl Config {
|
|||
let mut color_collection = HashMap::new();
|
||||
let output = Command::new("task").arg("rc.color=off").arg("show").output()?;
|
||||
|
||||
let data = String::from_utf8(output.stdout).expect("Unable to convert stdout to string");
|
||||
let data = String::from_utf8_lossy(&output.stdout);
|
||||
for line in data.split('\n') {
|
||||
if line.starts_with("color.") {
|
||||
let mut i = line.split(' ');
|
||||
|
@ -264,7 +264,7 @@ impl Config {
|
|||
.output()
|
||||
.expect("Unable to run `task show`");
|
||||
|
||||
let data = String::from_utf8(output.stdout).expect("Unable to convert stdout to string");
|
||||
let data = String::from_utf8_lossy(&output.stdout);
|
||||
|
||||
for line in data.split('\n') {
|
||||
if line.starts_with(config) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue