summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbold <bold@cryptoguru.com>2020-01-04 13:57:14 +0100
committerWez Furlong <wez@wezfurlong.org>2020-01-11 12:02:32 -0800
commit2d120a8103e4d29ddd3aa4327f011bc9178b23fa (patch)
treeecca9d4725425d1b3f4b17c6ba8280b062d35004 /src
parent3a26d07a6abab57be7006d60bcf36ff1c09922f1 (diff)
downloadssh2-rs-2d120a8103e4d29ddd3aa4327f011bc9178b23fa.zip
simplify unwrap_or_else argument
Diffstat (limited to 'src')
-rw-r--r--src/sftp.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sftp.rs b/src/sftp.rs
index 4458805..0a242d0 100644
--- a/src/sftp.rs
+++ b/src/sftp.rs
@@ -136,7 +136,7 @@ impl Sftp {
open_type as c_int,
);
if ret.is_null() {
- Err(self.last_session_error().unwrap_or_else(|| { Error::unknown() }))
+ Err(self.last_session_error().unwrap_or_else(Error::unknown))
} else {
Ok(File::from_raw(self, ret))
}