Skip to content

Commit e8f2bfc

Browse files
committed
Trivial changes
1 parent 2f63262 commit e8f2bfc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/file/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl File {
9191
#[cfg(feature = "remote-run")]
9292
/// Upload a file to the managed host.
9393
pub fn upload(&self, host: &mut Host, local_path: &str, options: Option<&[zfilexfer::FileOptions]>) -> Result<()> {
94-
let file = zfilexfer::File::open(&local_path, options).unwrap();
94+
let file = try!(zfilexfer::File::open(&local_path, options));
9595
host.send_file(&file, &self.path)
9696
}
9797

src/host/remote.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ impl Host {
116116
}
117117

118118
#[doc(hidden)]
119-
pub fn send_file<P: AsRef<Path>>(&mut self, file: &zfilexfer::File, local_path: P) -> Result<()> {
119+
pub fn send_file<P: AsRef<Path>>(&mut self, file: &zfilexfer::File, remote_path: P) -> Result<()> {
120120
if self.file_sock.is_none() {
121121
return Err(Error::HostDisconnected);
122122
}
123123

124-
try!(file.send(self.file_sock.as_ref().unwrap(), local_path));
124+
try!(file.send(self.file_sock.as_ref().unwrap(), remote_path));
125125
Ok(())
126126
}
127127

0 commit comments

Comments
 (0)