#[test]
fn recursive_mkdir_slash() {
- check!(fs::create_dir_all(&Path::new("/")));
+ check!(fs::create_dir_all(Path::new("/")));
}
#[test]
fn recursive_mkdir_dot() {
- check!(fs::create_dir_all(&Path::new(".")));
+ check!(fs::create_dir_all(Path::new(".")));
}
#[test]
fn recursive_mkdir_empty() {
- check!(fs::create_dir_all(&Path::new("")));
+ check!(fs::create_dir_all(Path::new("")));
}
#[test]
let mut options = OpenOptions::new();
options.read(true);
options.write(true);
- Ok(TcpStream(File::open(&Path::new(path.as_str()), &options)?))
+ Ok(TcpStream(File::open(Path::new(path.as_str()), &options)?))
}
pub fn connect_timeout(_addr: &SocketAddr, _timeout: Duration) -> Result<TcpStream> {
let mut options = OpenOptions::new();
options.read(true);
options.write(true);
- Ok(TcpListener(File::open(&Path::new(path.as_str()), &options)?))
+ Ok(TcpListener(File::open(Path::new(path.as_str()), &options)?))
}
pub fn accept(&self) -> Result<(TcpStream, SocketAddr)> {
let mut options = OpenOptions::new();
options.read(true);
options.write(true);
- Ok(UdpSocket(File::open(&Path::new(path.as_str()), &options)?, UnsafeCell::new(None)))
+ Ok(UdpSocket(File::open(Path::new(path.as_str()), &options)?, UnsafeCell::new(None)))
}
fn get_conn(&self) -> &mut Option<SocketAddr> {
let mut opts = OpenOptions::new();
opts.read(readable);
opts.write(!readable);
- let fd = File::open(&Path::new("null:"), &opts)?;
+ let fd = File::open(Path::new("null:"), &opts)?;
Ok((ChildStdio::Owned(fd.into_fd()), None))
}
}