diff --git a/src/symbolize/gimli/coff.rs b/src/symbolize/gimli/coff.rs index 51bfd35b..031afea0 100644 --- a/src/symbolize/gimli/coff.rs +++ b/src/symbolize/gimli/coff.rs @@ -1,4 +1,4 @@ -use super::mystd::fs::Path; +use super::mystd::path::Path; use super::{gimli, Context, Endian, EndianSlice, Mapping, Stash}; use alloc::sync::Arc; use alloc::vec::Vec; diff --git a/src/symbolize/gimli/elf.rs b/src/symbolize/gimli/elf.rs index 66d2d433..a895fe45 100644 --- a/src/symbolize/gimli/elf.rs +++ b/src/symbolize/gimli/elf.rs @@ -4,7 +4,7 @@ use super::mystd::os::unix::ffi::OsStrExt; use super::mystd::path::{Path, PathBuf}; use super::Either; use super::{gimli, Context, Endian, EndianSlice, Mapping, Stash}; -use alloc::str::String; +use alloc::string::String; use alloc::sync::Arc; use alloc::vec::Vec; use core::convert::{TryFrom, TryInto}; @@ -335,8 +335,8 @@ fn debug_path_exists() -> bool { /// The format of build id paths is documented at: /// https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html fn locate_build_id(build_id: &[u8]) -> Option { - const BUILD_ID_PATH: &[u8] = b"/usr/lib/debug/.build-id/"; - const BUILD_ID_SUFFIX: &[u8] = b".debug"; + const BUILD_ID_PATH: &str = "/usr/lib/debug/.build-id/"; + const BUILD_ID_SUFFIX: &str = ".debug"; if build_id.len() < 2 { return None; @@ -348,7 +348,7 @@ fn locate_build_id(build_id: &[u8]) -> Option { let mut path = String::with_capacity(BUILD_ID_PATH.len() + BUILD_ID_SUFFIX.len() + build_id.len() * 2 + 1); - path.extend(BUILD_ID_PATH); + path.push_str(BUILD_ID_PATH); path.push(char::from_digit((build_id[0] >> 4) as u32, 16)?); path.push(char::from_digit((build_id[0] & 0xf) as u32, 16)?); path.push('/'); @@ -356,7 +356,7 @@ fn locate_build_id(build_id: &[u8]) -> Option { path.push(char::from_digit((byte >> 4) as u32, 16)?); path.push(char::from_digit((byte & 0xf) as u32, 16)?); } - path.extend(BUILD_ID_SUFFIX); + path.push_str(BUILD_ID_SUFFIX); Some(PathBuf::from(path)) } diff --git a/src/symbolize/gimli/macho.rs b/src/symbolize/gimli/macho.rs index c76e7b69..fcbe6098 100644 --- a/src/symbolize/gimli/macho.rs +++ b/src/symbolize/gimli/macho.rs @@ -1,4 +1,4 @@ -use super::mystd::fs::Path; +use super::mystd::path::Path; use super::{gimli, Context, Endian, EndianSlice, Mapping, Stash}; use alloc::boxed::Box; use alloc::sync::Arc; diff --git a/src/symbolize/gimli/parse_running_mmaps_unix.rs b/src/symbolize/gimli/parse_running_mmaps_unix.rs index 1058cf31..f7b9327b 100644 --- a/src/symbolize/gimli/parse_running_mmaps_unix.rs +++ b/src/symbolize/gimli/parse_running_mmaps_unix.rs @@ -5,7 +5,7 @@ use super::mystd::ffi::OsString; use super::mystd::fs::File; use super::mystd::io::Read; -use alloc::str::String; +use alloc::string::String; use alloc::vec::Vec; use core::str::FromStr; diff --git a/src/symbolize/gimli/xcoff.rs b/src/symbolize/gimli/xcoff.rs index dc9a1790..77fd1d3d 100644 --- a/src/symbolize/gimli/xcoff.rs +++ b/src/symbolize/gimli/xcoff.rs @@ -1,6 +1,6 @@ use super::mystd::ffi::{OsStr, OsString}; -use super::mystd::fs::Path; use super::mystd::os::unix::ffi::OsStrExt; +use super::mystd::path::Path; use super::{gimli, Context, Endian, EndianSlice, Mapping, Stash}; use alloc::sync::Arc; use alloc::vec::Vec;