Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eventheader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ categories = [
]
repository = "https://github.com/microsoft/LinuxTracepoints-Rust"
readme = "README.md"
rust-version = "1.63"
rust-version = "1.64"

[features]
default = ["user_events", "macros"]
Expand Down
2 changes: 1 addition & 1 deletion eventheader_dynamic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ categories = [
]
repository = "https://github.com/microsoft/LinuxTracepoints-Rust"
readme = "README.md"
rust-version = "1.63"
rust-version = "1.64"

[features]
default = ["user_events"]
Expand Down
2 changes: 1 addition & 1 deletion eventheader_dynamic/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ impl Ord for EventSet {

impl PartialOrd for EventSet {
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
Some(self.key.cmp(&other.key))
Some(self.cmp(other))
}
}

Expand Down
2 changes: 1 addition & 1 deletion eventheader_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT"
description = "Rust macros for eventheader-encoded Linux Tracepoints via user_events"
repository = "https://github.com/microsoft/LinuxTracepoints-Rust"
readme = "README.md"
rust-version = "1.63"
rust-version = "1.64"

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion eventheader_macros/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl<'a> Parser<'a> {
/// Reads OptionIdent(ArgsGroup) or {...} then moves to the next comma or the end-of-stream.
/// Emits "expected option" errors for non-option syntax.
/// Emits "expected ..." error for other tokens encountered before comma or end-of-stream.
pub fn next_arg(&mut self, want_struct: bool) -> ArgResult {
pub fn next_arg(&mut self, want_struct: bool) -> ArgResult<'_> {
const EXPECTED_OPTION: &str = "expected identifier for option name, e.g. Option(args...)";
const EXPECTED_OPTION_OR_STRUCT: &str =
"expected '{' for struct or identifier for option name, e.g. Option(args...)";
Expand Down
2 changes: 1 addition & 1 deletion eventheader_macros/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Tree {
return self;
}

pub fn drain(&mut self) -> vec::Drain<TokenTree> {
pub fn drain(&mut self) -> vec::Drain<'_, TokenTree> {
debug_assert!(self.span_stack.is_empty());
return self.trees.drain(..);
}
Expand Down
2 changes: 1 addition & 1 deletion eventheader_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ categories = [
]
repository = "https://github.com/microsoft/LinuxTracepoints-Rust"
readme = "README.md"
rust-version = "1.63"
rust-version = "1.64"

[dependencies]

Expand Down
2 changes: 1 addition & 1 deletion tracepoint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ categories = [
]
repository = "https://github.com/microsoft/LinuxTracepoints-Rust"
readme = "README.md"
rust-version = "1.63"
rust-version = "1.64"

[features]
default = ["user_events"]
Expand Down
2 changes: 1 addition & 1 deletion tracepoint_decode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ categories = [
]
repository = "https://github.com/microsoft/LinuxTracepoints-Rust"
readme = "README.md"
rust-version = "1.63"
rust-version = "1.74"

[features]
default = ["rustc_1_77"]
Expand Down
8 changes: 4 additions & 4 deletions tracepoint_decode/src/perf_event_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl<'a> PerfNonSampleEventInfo<'a> {
/// value as the [PerfNonSampleEventInfo::name] method, but as a Display object (can
/// be passed to a format macro) and with JSON escaping applied (control chars,
/// quotes, and backslashes are escaped)
pub fn json_name_display(&self) -> display::JsonEscapeDisplay {
pub fn json_name_display(&self) -> display::JsonEscapeDisplay<'_> {
display::JsonEscapeDisplay::new(self.name())
}

Expand Down Expand Up @@ -230,7 +230,7 @@ impl<'a> PerfNonSampleEventInfo<'a> {
/// - `"tid": 124` (omitted if unavailable or if pid is shown and pid == tid)
/// - `"provider": "SystemName"` (omitted if unavailable)
/// - `"event": "TracepointName"` (omitted if unavailable)
pub const fn json_meta_display(&self) -> display::EventInfoJsonMetaDisplay {
pub const fn json_meta_display(&self) -> display::EventInfoJsonMetaDisplay<'_> {
display::EventInfoJsonMetaDisplay::new(
self.session_info,
self.event_desc,
Expand Down Expand Up @@ -398,7 +398,7 @@ impl<'a> PerfSampleEventInfo<'a> {
/// value as the [PerfSampleEventInfo::name] method, but as a Display object (can
/// be passed to a format macro) and with JSON escaping applied (control chars,
/// quotes, and backslashes are escaped)
pub fn json_name_display(&self) -> display::JsonEscapeDisplay {
pub fn json_name_display(&self) -> display::JsonEscapeDisplay<'_> {
display::JsonEscapeDisplay::new(self.name())
}

Expand Down Expand Up @@ -471,7 +471,7 @@ impl<'a> PerfSampleEventInfo<'a> {
/// - `"tid": 124` (omitted if unavailable or if pid is shown and pid == tid)
/// - `"provider": "SystemName"` (omitted if unavailable)
/// - `"event": "TracepointName"` (omitted if unavailable)
pub const fn json_meta_display(&self) -> display::EventInfoJsonMetaDisplay {
pub const fn json_meta_display(&self) -> display::EventInfoJsonMetaDisplay<'_> {
display::EventInfoJsonMetaDisplay::new(
self.session_info,
self.event_desc,
Expand Down
4 changes: 2 additions & 2 deletions tracepoint_decode/src/perf_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ impl<'dat> PerfItemValue<'dat> {
///
/// For example, `write!(writer, "{}", value.display())` might generate a string
/// like `53`, `true`, `Hello`, or `1, 2, 3`.
pub fn display(&self) -> display::PerfItemValueDisplay {
pub fn display(&self) -> display::PerfItemValueDisplay<'_> {
return display::PerfItemValueDisplay::new(self);
}

Expand Down Expand Up @@ -1192,7 +1192,7 @@ impl<'dat> PerfItemValue<'dat> {
///
/// For example, `write!(str, "{}", value.json_display())` might generate a string
/// like `53`, `true`, `"Hello"`, or `[1, 2, 3]`.
pub fn json_display(&self) -> display::PerfItemValueJsonDisplay {
pub fn json_display(&self) -> display::PerfItemValueJsonDisplay<'_> {
return display::PerfItemValueJsonDisplay::new(self);
}

Expand Down
2 changes: 1 addition & 1 deletion tracepoint_decode/src/writers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pub mod date_time {
tm: unsafe { core::mem::zeroed() },
};

if unsafe { core::ptr::null() == libc::gmtime_r(&value, &mut this.tm) } {
if unsafe { libc::gmtime_r(&value, &mut this.tm).is_null() } {
this.tm.tm_mday = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion tracepoint_perf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ categories = [
]
repository = "https://github.com/microsoft/LinuxTracepoints-Rust"
readme = "README.md"
rust-version = "1.63"
rust-version = "1.64"

[dependencies]
eventheader_types = { version = "= 0.4.1", path = "../eventheader_types" }
Expand Down
2 changes: 1 addition & 1 deletion tracepoint_perf/src/file_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl PerfDataFileReader {

/// Returns the header and data of the current event.
/// If there is no current event, returns a default-constructed `PerfEventBytes`.
pub fn current_event(&self) -> PerfEventBytes {
pub fn current_event(&self) -> PerfEventBytes<'_> {
if self.current.range.len() < PERF_EVENT_HEADER_SIZE {
return PerfEventBytes::new(PerfEventHeader::default(), &[]);
} else {
Expand Down
Loading