summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2023-10-15 21:10:24 +0200
committerSanto Cariotti <santo@dcariotti.me>2023-10-15 21:10:24 +0200
commit6c341cddabcff6e11e1d1357952ec62d6734e177 (patch)
treeeb36e68c77b1cc68690cce7c30a6d0ba54df883f
parent073d565b303bde5d3a79f5d5c426d6c2822912d4 (diff)
Fix clippy
-rw-r--r--src/main.rs4
-rw-r--r--src/trace.rs2
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]);