Skip to content

Commit b9e231e

Browse files
committed
Remove another unnecessary OsStr usage
1 parent 9c8812e commit b9e231e

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
@@ -393,7 +393,7 @@ fn decompress_zstd(mut input: &[u8], mut output: &mut [u8]) -> Option<()> {
393393
Some(())
394394
}
395395

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

398398
fn debug_path_exists() -> bool {
399399
cfg_if::cfg_if! {
@@ -403,7 +403,7 @@ fn debug_path_exists() -> bool {
403403

404404
let mut exists = DEBUG_PATH_EXISTS.load(Ordering::Relaxed);
405405
if exists == 0 {
406-
exists = if Path::new(OsStr::from_bytes(DEBUG_PATH)).is_dir() {
406+
exists = if Path::new(DEBUG_PATH).is_dir() {
407407
1
408408
} else {
409409
2
@@ -484,7 +484,7 @@ fn locate_debuglink(path: &Path, filename: &[u8]) -> Option<PathBuf> {
484484
if debug_path_exists() {
485485
// Try "/usr/lib/debug/parent/filename"
486486
f.clear();
487-
f.push(OsStr::from_bytes(DEBUG_PATH));
487+
f.push(DEBUG_PATH);
488488
f.push(parent.strip_prefix("/").unwrap());
489489
f.push(filename);
490490
if f.is_file() {

0 commit comments

Comments
 (0)