Skip to content

Commit

Permalink
Update dependencies (#288)
Browse files Browse the repository at this point in the history
- object to 0.35
- memmap2 to 0.9
  • Loading branch information
a1phyr authored Apr 11, 2024
1 parent 24344dc commit c0581af
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ rust-version = "1.65"
[dependencies]
gimli = { version = "0.28.0", default-features = false, features = ["read"] }
fallible-iterator = { version = "0.3.0", default-features = false, optional = true }
memmap2 = { version = "0.5.5", optional = true }
object = { version = "0.32.0", default-features = false, features = ["read"], optional = true }
memmap2 = { version = "0.9.4", optional = true }
object = { version = "0.35.0", default-features = false, features = ["read"], optional = true }
smallvec = { version = "1", default-features = false, optional = true }
rustc-demangle = { version = "0.1", optional = true }
cpp_demangle = { version = "0.4", default-features = false, features = ["alloc"], optional = true }
Expand Down
6 changes: 3 additions & 3 deletions src/builtin_split_dwarf_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ fn convert_path<R: gimli::Reader<Endian = gimli::RunTimeEndian>>(
Ok(PathBuf::from(s))
}

fn load_section<'data: 'file, 'file, O, R, F>(
fn load_section<'data, O, R, F>(
id: gimli::SectionId,
file: &'file O,
file: &O,
endian: R::Endian,
loader: &mut F,
) -> Result<R, gimli::Error>
where
O: object::Object<'data, 'file>,
O: object::Object<'data>,
R: gimli::Reader<Endian = gimli::RunTimeEndian>,
F: FnMut(Cow<'data, [u8]>, R::Endian) -> R,
{
Expand Down
16 changes: 7 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@ impl Context<gimli::EndianRcSlice<gimli::RunTimeEndian>> {
/// Performance sensitive applications may want to use `Context::from_dwarf`
/// with a more specialised `gimli::Reader` implementation.
#[inline]
pub fn new<'data: 'file, 'file, O: object::Object<'data, 'file>>(
file: &'file O,
) -> Result<Self, Error> {
pub fn new<'data, O: object::Object<'data>>(file: &O) -> Result<Self, Error> {
Self::new_with_sup(file, None)
}

Expand All @@ -219,23 +217,23 @@ impl Context<gimli::EndianRcSlice<gimli::RunTimeEndian>> {
///
/// Performance sensitive applications may want to use `Context::from_dwarf`
/// with a more specialised `gimli::Reader` implementation.
pub fn new_with_sup<'data: 'file, 'file, O: object::Object<'data, 'file>>(
file: &'file O,
sup_file: Option<&'file O>,
pub fn new_with_sup<'data, O: object::Object<'data>>(
file: &O,
sup_file: Option<&O>,
) -> Result<Self, Error> {
let endian = if file.is_little_endian() {
gimli::RunTimeEndian::Little
} else {
gimli::RunTimeEndian::Big
};

fn load_section<'data: 'file, 'file, O, Endian>(
fn load_section<'data, O, Endian>(
id: gimli::SectionId,
file: &'file O,
file: &O,
endian: Endian,
) -> Result<gimli::EndianRcSlice<Endian>, Error>
where
O: object::Object<'data, 'file>,
O: object::Object<'data>,
Endian: gimli::Endianity,
{
use object::ObjectSection;
Expand Down
6 changes: 3 additions & 3 deletions tests/correctness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ fn correctness() {
gimli::RunTimeEndian::Big
};

fn load_section<'data: 'file, 'file, O, Endian>(
fn load_section<'data, O, Endian>(
id: gimli::SectionId,
file: &'file O,
file: &O,
endian: Endian,
) -> Result<gimli::EndianArcSlice<Endian>, gimli::Error>
where
O: object::Object<'data, 'file>,
O: object::Object<'data>,
Endian: gimli::Endianity,
{
use object::ObjectSection;
Expand Down

0 comments on commit c0581af

Please sign in to comment.