Skip to content

Commit

Permalink
Fix introduced compile failures
Browse files Browse the repository at this point in the history
  • Loading branch information
CraftSpider committed Sep 7, 2024
1 parent 82852e6 commit dc02f37
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/symbolize/gimli/coff.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/symbolize/gimli/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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<PathBuf> {
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;
Expand All @@ -348,15 +348,15 @@ fn locate_build_id(build_id: &[u8]) -> Option<PathBuf> {

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('/');
for byte in &build_id[1..] {
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))
}

Expand Down
2 changes: 1 addition & 1 deletion src/symbolize/gimli/macho.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/symbolize/gimli/parse_running_mmaps_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/symbolize/gimli/xcoff.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit dc02f37

Please sign in to comment.