From 1791d497d3af39bd8da4eb666dece22c60e97281 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Tue, 11 Nov 2025 14:58:50 -0500 Subject: [PATCH] programs: remove superfluous type ascription --- aya/src/programs/probe.rs | 4 ++-- aya/src/programs/trace_point.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aya/src/programs/probe.rs b/aya/src/programs/probe.rs index 9f6eea90..21419e08 100644 --- a/aya/src/programs/probe.rs +++ b/aya/src/programs/probe.rs @@ -324,7 +324,7 @@ fn read_sys_fs_perf_type(pmu: &str) -> Result { .join("type"); fs::read_to_string(&file) - .and_then(|perf_ty| perf_ty.trim().parse::().map_err(io::Error::other)) + .and_then(|perf_ty| perf_ty.trim().parse().map_err(io::Error::other)) .map_err(|e| (file, e)) } @@ -340,7 +340,7 @@ fn read_sys_fs_perf_ret_probe(pmu: &str) -> Result { .next() .ok_or_else(|| io::Error::other("invalid format"))?; - config.parse::().map_err(io::Error::other) + config.parse().map_err(io::Error::other) }) .map_err(|e| (file, e)) } diff --git a/aya/src/programs/trace_point.rs b/aya/src/programs/trace_point.rs index 651e8b13..564e3a57 100644 --- a/aya/src/programs/trace_point.rs +++ b/aya/src/programs/trace_point.rs @@ -122,7 +122,7 @@ pub(crate) fn read_sys_fs_trace_point_id( Ok(id) => id, Err(io_error) => return Err(TracePointError::FileError { filename, io_error }), }; - let id = match id.trim().parse::() { + let id = match id.trim().parse() { Ok(id) => id, Err(error) => { return Err(TracePointError::FileError {