diff options
author | bold <bold@cryptoguru.com> | 2020-01-04 13:57:14 +0100 |
---|---|---|
committer | Wez Furlong <wez@wezfurlong.org> | 2020-01-11 12:02:32 -0800 |
commit | 2d120a8103e4d29ddd3aa4327f011bc9178b23fa (patch) | |
tree | ecca9d4725425d1b3f4b17c6ba8280b062d35004 /src | |
parent | 3a26d07a6abab57be7006d60bcf36ff1c09922f1 (diff) | |
download | ssh2-rs-2d120a8103e4d29ddd3aa4327f011bc9178b23fa.zip |
simplify unwrap_or_else argument
Diffstat (limited to 'src')
-rw-r--r-- | src/sftp.rs | 2 |
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)) } |