From 6c341cddabcff6e11e1d1357952ec62d6734e177 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sun, 15 Oct 2023 21:10:24 +0200 Subject: Fix clippy --- src/main.rs | 4 ++-- src/trace.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8e99cb5..d4347ad 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,14 +33,14 @@ fn main() -> anyhow::Result<()> { let pid = match fork() { Ok(Fork::Child) => return exec(&args.command), - Ok(Fork::Parent(child)) => Pid::from_raw(child as i32), + Ok(Fork::Parent(child)) => Pid::from_raw(child), Err(err) => panic!("fork() failed: {err}"), }; let output = trace(pid, args.file_to_print)?; let lines = str::from_utf8(&output)?.trim(); if !args.no_tui { - let _ = run_tui(pid, lines)?; + run_tui(pid, lines)?; } else { writeln!(io::stdout(), "{lines}")?; } diff --git a/src/trace.rs b/src/trace.rs index b2880d5..e576320 100644 --- a/src/trace.rs +++ b/src/trace.rs @@ -9,7 +9,7 @@ use nix::{ use std::{fs::File, io::Write, os::unix::process::CommandExt, process::Command}; /// Exec the `command` value tracing it with `ptrace` lib -pub fn exec(command: &String) -> anyhow::Result<()> { +pub fn exec(command: &str) -> anyhow::Result<()> { let params: Vec<&str> = command.split(' ').collect(); let mut command = Command::new(params[0]); -- cgit v1.2.3-18-g5258