Skip to content

Commit fbe0811

Browse files
committed
Revert "Replace OsStr's .display() with .to_string_lossy()"
This reverts commit 784e212. Android is now on Rust 1.87.0
1 parent 784e212 commit fbe0811

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src-rs/regen_dump.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn inner(
8888
let files = load_vec_string(fp)?;
8989
if dump_files {
9090
for file in files {
91-
println!("{}", file.to_string_lossy());
91+
println!("{}", file.display());
9292
}
9393
}
9494
}
@@ -97,7 +97,7 @@ fn inner(
9797
let undefined = load_vec_string(fp)?;
9898
if dump_env {
9999
for var in undefined {
100-
println!("undefined: {}", var.to_string_lossy());
100+
println!("undefined: {}", var.display());
101101
}
102102
}
103103
}
@@ -107,7 +107,7 @@ fn inner(
107107
let name = load_string(fp)?;
108108
let value = load_string(fp)?;
109109
if dump_env {
110-
println!("{}: {}", name.to_string_lossy(), value.to_string_lossy());
110+
println!("{}: {}", name.display(), value.display());
111111
}
112112
}
113113

@@ -117,10 +117,10 @@ fn inner(
117117

118118
let files = load_vec_string(fp)?;
119119
if dump_globs {
120-
println!("{}", pat.to_string_lossy());
120+
println!("{}", pat.display());
121121

122122
for s in files {
123-
println!(" {}", s.to_string_lossy());
123+
println!(" {}", s.display());
124124
}
125125
}
126126
}
@@ -145,46 +145,46 @@ fn inner(
145145

146146
if dump_finds {
147147
println!("cmd type: FIND");
148-
println!(" shell: {}", shell.to_string_lossy());
149-
println!(" shell flagss: {}", shellflag.to_string_lossy());
150-
println!(" loc: {}:{line}", file.to_string_lossy());
151-
println!(" cmd: {}", cmd.to_string_lossy());
148+
println!(" shell: {}", shell.display());
149+
println!(" shell flagss: {}", shellflag.display());
150+
println!(" loc: {}:{line}", file.display());
151+
println!(" cmd: {}", cmd.display());
152152
if !result.is_empty() && result.len() < 500 && !result.as_bytes().contains(&b'\n') {
153-
println!(" output: {}", result.to_string_lossy());
153+
println!(" output: {}", result.display());
154154
} else {
155155
println!(" output: <{} bytes>", result.len());
156156
}
157157
println!(" missing dirs:");
158158
for d in missing_dirs {
159-
println!(" {}", d.to_string_lossy());
159+
println!(" {}", d.display());
160160
}
161161
println!(" files:");
162162
for f in files {
163-
println!(" {}", f.to_string_lossy());
163+
println!(" {}", f.display());
164164
}
165165
println!(" read dirs:");
166166
for d in read_dirs {
167-
println!(" {}", d.to_string_lossy());
167+
println!(" {}", d.display());
168168
}
169169
println!();
170170
}
171171
} else if dump_cmds {
172172
match op {
173173
CommandOp::Shell => {
174174
println!("cmd type: SHELL");
175-
println!(" shell: {}", shell.to_string_lossy());
176-
println!(" shell flagss: {}", shellflag.to_string_lossy());
175+
println!(" shell: {}", shell.display());
176+
println!(" shell flagss: {}", shellflag.display());
177177
}
178178
CommandOp::Read => println!("cmd type: READ"),
179179
CommandOp::ReadMissing => println!("cmd type: READ_MISSING"),
180180
CommandOp::Write => println!("cmd type: WRITE"),
181181
CommandOp::Append => println!("cmd type: APPEND"),
182182
CommandOp::Find => unreachable!(),
183183
}
184-
println!(" loc: {}:{line}", file.to_string_lossy());
185-
println!(" cmd: {}", cmd.to_string_lossy());
184+
println!(" loc: {}:{line}", file.display());
185+
println!(" cmd: {}", cmd.display());
186186
if !result.is_empty() && result.len() < 500 && !result.as_bytes().contains(&b'\n') {
187-
println!(" output: {}", result.to_string_lossy());
187+
println!(" output: {}", result.display());
188188
} else {
189189
println!(" output: <{} bytes>", result.len());
190190
}

0 commit comments

Comments
 (0)