Skip to content

Commit 9240bd0

Browse files
Revert "Try turning && to &"
This reverts commit 3a4e308.
1 parent e3cab69 commit 9240bd0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/symbolize/gimli/elf.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl<'a> Object<'a> {
257257
.iter()
258258
.filter_map(|header| {
259259
let name = self.sections.section_name(self.endian, header).ok()?;
260-
if name.starts_with(b".zdebug_") & (&name[8..] == debug_name) {
260+
if name.starts_with(b".zdebug_") && &name[8..] == debug_name {
261261
Some(header)
262262
} else {
263263
None
@@ -287,7 +287,7 @@ impl<'a> Object<'a> {
287287
Err(i) => i.checked_sub(1)?,
288288
};
289289
let sym = self.syms.get(i)?;
290-
if (sym.address <= addr) & (addr <= sym.address + sym.size) {
290+
if sym.address <= addr && addr <= sym.address + sym.size {
291291
self.strings.get(sym.name).ok()
292292
} else {
293293
None
@@ -302,7 +302,7 @@ impl<'a> Object<'a> {
302302
for section in self.sections.iter() {
303303
if let Ok(Some(mut notes)) = section.notes(self.endian, self.data) {
304304
while let Ok(Some(note)) = notes.next() {
305-
if (note.name() == ELF_NOTE_GNU) & (note.n_type(self.endian) == NT_GNU_BUILD_ID) {
305+
if note.name() == ELF_NOTE_GNU && note.n_type(self.endian) == NT_GNU_BUILD_ID {
306306
return Some(note.desc());
307307
}
308308
}
@@ -353,7 +353,7 @@ fn decompress_zlib(input: &[u8], output: &mut [u8]) -> Option<()> {
353353
0,
354354
TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | TINFL_FLAG_PARSE_ZLIB_HEADER,
355355
);
356-
if (status == TINFLStatus::Done) & (in_read == input.len()) & (out_read == output.len()) {
356+
if status == TINFLStatus::Done && in_read == input.len() && out_read == output.len() {
357357
Some(())
358358
} else {
359359
None

src/symbolize/gimli/parse_running_mmaps_unix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl MapsEntry {
7979

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

8585
#[cfg(target_os = "android")]

0 commit comments

Comments
 (0)