Skip to content

Commit 2e53be1

Browse files
committed
Fixup mystd imports
1 parent c521d9a commit 2e53be1

File tree

12 files changed

+44
-23
lines changed

12 files changed

+44
-23
lines changed

src/symbolize/gimli/coff.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
use super::{gimli, Context, Endian, EndianSlice, Mapping, Path, Stash, Vec};
1+
use super::mystd::fs::Path;
2+
use super::{gimli, Context, Endian, EndianSlice, Mapping, Stash};
23
use alloc::sync::Arc;
4+
use alloc::vec::Vec;
35
use core::convert::TryFrom;
46
use object::pe::{ImageDosHeader, ImageSymbol};
57
use object::read::coff::ImageSymbol as _;

src/symbolize/gimli/elf.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ use super::mystd::fs;
33
use super::mystd::os::unix::ffi::{OsStrExt, OsStringExt};
44
use super::mystd::path::{Path, PathBuf};
55
use super::Either;
6-
use super::{gimli, Context, Endian, EndianSlice, Mapping, Stash, Vec};
6+
use super::{gimli, Context, Endian, EndianSlice, Mapping, Stash};
77
use alloc::sync::Arc;
8+
use alloc::vec::Vec;
89
use core::convert::{TryFrom, TryInto};
910
use core::str;
1011
use object::elf::{ELFCOMPRESS_ZLIB, ELF_NOTE_GNU, NT_GNU_BUILD_ID, SHF_COMPRESSED};

src/symbolize/gimli/libs_aix.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
use super::mystd::borrow::ToOwned;
21
use super::mystd::env;
3-
use super::mystd::ffi::{CStr, OsStr};
2+
use super::mystd::ffi::OsStr;
43
use super::mystd::io::Error;
54
use super::mystd::os::unix::prelude::*;
65
use super::xcoff;
7-
use super::{Library, LibrarySegment, Vec};
6+
use super::{Library, LibrarySegment};
7+
use alloc::borrow::ToOwned;
88
use alloc::vec;
9+
use alloc::vec::Vec;
10+
use core::ffi::CStr;
911
use core::mem;
1012

1113
const EXE_IMAGE_BASE: u64 = 0x100000000;

src/symbolize/gimli/libs_dl_iterate_phdr.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
// and typically implement an API called `dl_iterate_phdr` to load
33
// native libraries.
44

5-
use super::mystd::borrow::ToOwned;
65
use super::mystd::env;
7-
use super::mystd::ffi::{CStr, OsStr};
6+
use super::mystd::ffi::{OsStr, OsString};
87
use super::mystd::os::unix::prelude::*;
9-
use super::{Library, LibrarySegment, OsString, Vec};
8+
use super::{Library, LibrarySegment};
9+
use alloc::borrow::ToOwned;
10+
use alloc::vec::Vec;
11+
use core::ffi::CStr;
1012
use core::slice;
1113

1214
pub(super) fn native_libraries() -> Vec<Library> {

src/symbolize/gimli/libs_haiku.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
// that section. All the read-only segments of the ELF-binary are in
66
// that part of the address space.
77

8-
use super::mystd::borrow::ToOwned;
9-
use super::mystd::ffi::{CStr, OsStr};
10-
use super::mystd::mem::MaybeUninit;
8+
use super::mystd::ffi::OsStr;
119
use super::mystd::os::unix::prelude::*;
12-
use super::{Library, LibrarySegment, Vec};
10+
use super::{Library, LibrarySegment};
11+
use alloc::borrow::ToOwned;
12+
use alloc::vec::Vec;
13+
use core::ffi::CStr;
14+
use core::mem::MaybeUninit;
1315

1416
pub(super) fn native_libraries() -> Vec<Library> {
1517
let mut libraries: Vec<Library> = Vec::new();

src/symbolize/gimli/libs_illumos.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
use super::mystd::borrow::ToOwned;
2-
use super::mystd::ffi::{CStr, OsStr};
1+
use super::mystd::ffi::OsStr;
32
use super::mystd::os::unix::prelude::*;
4-
use super::{Library, LibrarySegment, Vec};
3+
use super::{Library, LibrarySegment};
4+
use alloc::borrow::ToOwned;
5+
use alloc::vec::Vec;
6+
use core::ffi::CStr;
57
use core::mem;
68
use object::NativeEndian;
79

src/symbolize/gimli/libs_libnx.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
use super::{Library, LibrarySegment, Vec};
1+
use super::{Library, LibrarySegment};
2+
use alloc::vec::Vec;
23

34
// DevkitA64 doesn't natively support debug info, but the build system will
45
// place debug info at the path `romfs:/debug_info.elf`.

src/symbolize/gimli/libs_macos.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#![allow(deprecated)]
22

3-
use super::mystd::ffi::{CStr, OsStr};
3+
use super::mystd::ffi::OsStr;
44
use super::mystd::os::unix::prelude::*;
55
use super::mystd::prelude::v1::*;
66
use super::{Library, LibrarySegment};
77
use core::convert::TryInto;
8+
use core::ffi::CStr;
89
use core::mem;
910

1011
// FIXME: replace with ptr::from_ref once MSRV is high enough

src/symbolize/gimli/libs_windows.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use super::super::super::windows_sys::*;
2+
use super::mystd::ffi::OsString;
23
use super::mystd::os::windows::prelude::*;
3-
use super::{coff, mmap, Library, LibrarySegment, OsString};
4+
use super::{coff, mmap, Library, LibrarySegment};
45
use alloc::vec;
56
use alloc::vec::Vec;
67
use core::mem;

src/symbolize/gimli/macho.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
use super::{gimli, Box, Context, Endian, EndianSlice, Mapping, Path, Stash, Vec};
1+
use super::mystd::fs::Path;
2+
use super::{gimli, Context, Endian, EndianSlice, Mapping, Stash};
3+
use alloc::boxed::Box;
24
use alloc::sync::Arc;
5+
use alloc::vec::Vec;
36
use core::convert::TryInto;
47
use object::macho;
58
use object::read::macho::{MachHeader, Nlist, Section, Segment as _};

src/symbolize/gimli/parse_running_mmaps_unix.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
// in `mod libs_dl_iterate_phdr` (e.g. linux, freebsd, ...); it may be more
33
// general purpose, but it hasn't been tested elsewhere.
44

5+
use super::mystd::ffi::OsString;
56
use super::mystd::fs::File;
67
use super::mystd::io::Read;
7-
use super::mystd::str::FromStr;
8-
use super::{OsString, String, Vec};
8+
use alloc::str::String;
9+
use alloc::vec::Vec;
10+
use core::str::FromStr;
911

1012
#[derive(PartialEq, Eq, Debug)]
1113
pub(super) struct MapsEntry {

src/symbolize/gimli/xcoff.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
use super::mystd::ffi::{OsStr, OsString};
2+
use super::mystd::fs::Path;
23
use super::mystd::os::unix::ffi::OsStrExt;
3-
use super::mystd::str;
4-
use super::{gimli, Context, Endian, EndianSlice, Mapping, Path, Stash, Vec};
4+
use super::{gimli, Context, Endian, EndianSlice, Mapping, Stash};
55
use alloc::sync::Arc;
6+
use alloc::vec::Vec;
67
use core::ops::Deref;
8+
use core::str;
79
use object::read::archive::ArchiveFile;
810
use object::read::xcoff::{FileHeader, SectionHeader, XcoffFile, XcoffSymbol};
911
use object::Object as _;

0 commit comments

Comments
 (0)