Skip to content

Commit d5c4d0f

Browse files
committed
Tidy up imports in test_ptrace.rs
1 parent 3192df4 commit d5c4d0f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/sys/test_ptrace.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ use nix::Error;
22
use nix::errno::*;
33
use nix::unistd::*;
44
use nix::sys::ptrace;
5-
use nix::sys::ptrace::*;
6-
use nix::sys::ptrace::ptrace::*;
75

86
use std::{mem, ptr};
97

108
#[test]
119
fn test_ptrace() {
10+
use nix::sys::ptrace::ptrace::*;
1211
// Just make sure ptrace can be called at all, for now.
1312
// FIXME: qemu-user doesn't implement ptrace on all arches, so permit ENOSYS
14-
let err = ptrace(PTRACE_ATTACH, getpid(), ptr::null_mut(), ptr::null_mut()).unwrap_err();
13+
let err = ptrace::ptrace(PTRACE_ATTACH, getpid(), ptr::null_mut(), ptr::null_mut()).unwrap_err();
1514
assert!(err == Error::Sys(Errno::EPERM) || err == Error::Sys(Errno::ENOSYS));
1615
}
1716

1817
// Just make sure ptrace_setoptions can be called at all, for now.
1918
#[test]
2019
fn test_ptrace_setoptions() {
20+
use nix::sys::ptrace::ptrace::*; // for PTRACE_O_TRACESYSGOOD
2121
let err = ptrace::setoptions(getpid(), PTRACE_O_TRACESYSGOOD).unwrap_err();
2222
assert!(err != Error::UnsupportedOperation);
2323
}

0 commit comments

Comments
 (0)