Merge pull request #394 from vadorovsky/clippy

Fix clippy warnings
pull/393/head
Michal Rostecki 2 years ago committed by GitHub
commit 6eca4f5709
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,7 +22,7 @@ enum RelocationError {
UnknownSymbol { index: usize }, UnknownSymbol { index: usize },
#[error("section `{section_index}` not found, referenced by symbol `{}` #{symbol_index}", #[error("section `{section_index}` not found, referenced by symbol `{}` #{symbol_index}",
.symbol_name.clone().unwrap_or_else(|| "".to_string()))] .symbol_name.clone().unwrap_or_default())]
SectionNotFound { SectionNotFound {
section_index: usize, section_index: usize,
symbol_index: usize, symbol_index: usize,

@ -30,7 +30,7 @@ pub(crate) fn perf_event_open(
attr.type_ = perf_type; attr.type_ = perf_type;
attr.sample_type = PERF_SAMPLE_RAW as u64; attr.sample_type = PERF_SAMPLE_RAW as u64;
// attr.inherits = if pid > 0 { 1 } else { 0 }; // attr.inherits = if pid > 0 { 1 } else { 0 };
attr.__bindgen_anon_2.wakeup_events = if wakeup { 1 } else { 0 }; attr.__bindgen_anon_2.wakeup_events = u32::from(wakeup);
if let Some(frequency) = sample_frequency { if let Some(frequency) = sample_frequency {
attr.set_freq(1); attr.set_freq(1);

Loading…
Cancel
Save