Skip to content

Commit

Permalink
Try turning && to &
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Jul 7, 2023
1 parent 6c7e3ac commit 3a4e308
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/symbolize/gimli/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl<'a> Object<'a> {
.iter()
.filter_map(|header| {
let name = self.sections.section_name(self.endian, header).ok()?;
if name.starts_with(b".zdebug_") && &name[8..] == debug_name {
if name.starts_with(b".zdebug_") & (&name[8..] == debug_name) {
Some(header)
} else {
None
Expand Down Expand Up @@ -231,7 +231,7 @@ impl<'a> Object<'a> {
Err(i) => i.checked_sub(1)?,
};
let sym = self.syms.get(i)?;
if sym.address <= addr && addr <= sym.address + sym.size {
if (sym.address <= addr) & (addr <= sym.address + sym.size) {
self.strings.get(sym.name).ok()
} else {
None
Expand All @@ -246,7 +246,7 @@ impl<'a> Object<'a> {
for section in self.sections.iter() {
if let Ok(Some(mut notes)) = section.notes(self.endian, self.data) {
while let Ok(Some(note)) = notes.next() {
if note.name() == ELF_NOTE_GNU && note.n_type(self.endian) == NT_GNU_BUILD_ID {
if (note.name() == ELF_NOTE_GNU) & (note.n_type(self.endian) == NT_GNU_BUILD_ID) {
return Some(note.desc());
}
}
Expand Down Expand Up @@ -297,7 +297,7 @@ fn decompress_zlib(input: &[u8], output: &mut [u8]) -> Option<()> {
0,
TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | TINFL_FLAG_PARSE_ZLIB_HEADER,
);
if status == TINFLStatus::Done && in_read == input.len() && out_read == output.len() {
if (status == TINFLStatus::Done) & (in_read == input.len()) & (out_read == output.len()) {
Some(())
} else {
None
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 @@ -77,7 +77,7 @@ impl MapsEntry {

#[inline]
pub(super) fn ip_matches(&self, ip: usize) -> bool {
self.address.0 <= ip && ip < self.address.1
(self.address.0 <= ip) & (ip < self.address.1)
}
}

Expand Down

0 comments on commit 3a4e308

Please sign in to comment.