Skip to content

Commit cfd94f5

Browse files
committed
Remove another unnecessary OsStr usage
1 parent dc02f37 commit cfd94f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/symbolize/gimli/elf.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ fn decompress_zlib(input: &[u8], output: &mut [u8]) -> Option<()> {
306306
}
307307
}
308308

309-
const DEBUG_PATH: &[u8] = b"/usr/lib/debug";
309+
const DEBUG_PATH: &str = "/usr/lib/debug";
310310

311311
fn debug_path_exists() -> bool {
312312
cfg_if::cfg_if! {
@@ -316,7 +316,7 @@ fn debug_path_exists() -> bool {
316316

317317
let mut exists = DEBUG_PATH_EXISTS.load(Ordering::Relaxed);
318318
if exists == 0 {
319-
exists = if Path::new(OsStr::from_bytes(DEBUG_PATH)).is_dir() {
319+
exists = if Path::new(DEBUG_PATH).is_dir() {
320320
1
321321
} else {
322322
2
@@ -397,7 +397,7 @@ fn locate_debuglink(path: &Path, filename: &[u8]) -> Option<PathBuf> {
397397
if debug_path_exists() {
398398
// Try "/usr/lib/debug/parent/filename"
399399
f.clear();
400-
f.push(OsStr::from_bytes(DEBUG_PATH));
400+
f.push(DEBUG_PATH);
401401
f.push(parent.strip_prefix("/").unwrap());
402402
f.push(filename);
403403
if f.is_file() {

0 commit comments

Comments
 (0)