mirror of
https://github.com/encounter/objdiff.git
synced 2025-12-09 05:27:47 +00:00
clippy & deny fixes
This commit is contained in:
@@ -386,7 +386,7 @@ fn line_info(obj_file: &File<'_>, sections: &mut [ObjSection], obj_data: &[u8])
|
||||
.index()
|
||||
.0;
|
||||
|
||||
let mut section_data = &reader[..];
|
||||
let mut section_data = reader;
|
||||
let size = read_u32(obj_file, &mut section_data)? as usize;
|
||||
if size > reader.len() {
|
||||
bail!("Line info size {size} exceeds remaining size {}", reader.len());
|
||||
|
||||
@@ -39,13 +39,13 @@ impl SplitMeta {
|
||||
}
|
||||
match note.n_type {
|
||||
NT_SPLIT_GENERATOR => {
|
||||
let string = String::from_utf8(note.desc.to_vec())
|
||||
.map_err(|e| anyhow::Error::from(e))?;
|
||||
let string =
|
||||
String::from_utf8(note.desc.to_vec()).map_err(anyhow::Error::new)?;
|
||||
result.generator = Some(string);
|
||||
}
|
||||
NT_SPLIT_MODULE_NAME => {
|
||||
let string = String::from_utf8(note.desc.to_vec())
|
||||
.map_err(|e| anyhow::Error::from(e))?;
|
||||
let string =
|
||||
String::from_utf8(note.desc.to_vec()).map_err(anyhow::Error::new)?;
|
||||
result.module_name = Some(string);
|
||||
}
|
||||
NT_SPLIT_MODULE_ID => {
|
||||
|
||||
Reference in New Issue
Block a user