We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 005c7ea commit 2e01eddCopy full SHA for 2e01edd
src/uu/pwdx/src/pwdx.rs
@@ -20,7 +20,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
20
let sys = System::new_all();
21
22
for pid_str in pids {
23
- let pid = match pid_str.parse::<i32>() {
+ let pid = match pid_str.parse::<usize>() {
24
// PIDs start at 1, hence 0 is invalid
25
Ok(0) | Err(_) => {
26
return Err(USimpleError::new(
@@ -31,7 +31,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
31
Ok(pid) => pid,
32
};
33
34
- match sys.process(Pid::from(pid as usize)) {
+ match sys.process(Pid::from(pid)) {
35
Some(process) => match process.cwd() {
36
Some(cwd) => println!("{pid}: {}", cwd.display()),
37
None => {
0 commit comments