Skip to content

Commit

Permalink
Fix nightly clippy lints (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem committed Jun 10, 2024
1 parent d914021 commit 2291045
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 33 deletions.
58 changes: 29 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/symcache_debug/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::fs::File;
use std::io::{Cursor, Write};
use std::path::PathBuf;
use std::str::FromStr;
use std::u64;

use anyhow::{anyhow, Context, Result};
use clap::builder::ValueParser;
Expand Down
2 changes: 1 addition & 1 deletion symbolic-cfi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ impl<W: Write> AsciiCfiWriter<W> {
// occur with a `code_start` close to the end of a function's code range, it seems
// likely that these belong to the function epilog and code_size has a different meaning
// in this case. Until this value is understood, skip these entries.
if frame.code_size > i32::max_value() as u32 {
if frame.code_size > i32::MAX as u32 {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion symbolic-debuginfo/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ impl<'data> SymbolMap<'data> {
let end = match range.end_bound() {
Bound::Included(end) => *end,
Bound::Excluded(end) => *end - 1,
Bound::Unbounded => u64::max_value(),
Bound::Unbounded => u64::MAX,
};

if end <= start || symbol.contains(end) {
Expand Down
1 change: 1 addition & 0 deletions symbolic-debuginfo/src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ impl<'data> DebugLink<'data> {
/// - A filename, with any leading directory components removed, followed by a zero byte,
/// - zero to three bytes of padding, as needed to reach the next four-byte boundary within the section, and
/// - a four-byte CRC checksum, stored in the same endianness used for the executable file itself.
///
/// (from <https://sourceware.org/gdb/current/onlinedocs/gdb/Separate-Debug-Files.html#index-_002egnu_005fdebuglink-sections>)
///
/// # Errors
Expand Down
2 changes: 1 addition & 1 deletion symbolic-debuginfo/src/macho/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
//! (subtract the global count to get the local index).
//!
//! > Unclear detail: If the global palette is smaller than 127, can the local
//! palette be larger than 128?
//! > palette be larger than 128?
//!
//! To compress these entries into a single 32-bit value, the address is truncated
//! to 24 bits and packed with the index. The addresses stored in these entries
Expand Down
1 change: 1 addition & 0 deletions symbolic-debuginfo/src/pdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ impl<'s> Unit<'s> {
/// For example we have observed in a real-world pdb that has:
/// - A function 0x33ea50 (size 0xc)
/// - With one line record: 0x33e850 (size 0x26)
///
/// The line record is completely outside the range of the function.
fn sanitize_lines(func: &mut Function) {
let fn_start = func.address;
Expand Down

0 comments on commit 2291045

Please sign in to comment.