diff options
| author | Reiner Herrmann <reiner@reiner-h.de> | 2022-05-01 15:48:04 +0200 |
|---|---|---|
| committer | Reiner Herrmann <reiner@reiner-h.de> | 2022-05-01 15:48:04 +0200 |
| commit | 5c8239ae1b1fc5b71d7020a23a944052af452709 (patch) | |
| tree | aa55e781c2610c066de218c5c33cdaf3a62aa0af /src/tftpd.rs | |
| parent | c5df3980491b628f637252cb2db202f8a4262cd0 (diff) | |
Fix clippy warnings and ignore two others
Diffstat (limited to 'src/tftpd.rs')
| -rw-r--r-- | src/tftpd.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tftpd.rs b/src/tftpd.rs index 47c225f..fea9d85 100644 --- a/src/tftpd.rs +++ b/src/tftpd.rs @@ -154,12 +154,12 @@ impl Tftpd { let mut file = match File::open(&path) { Ok(f) => f, Err(ref error) if error.kind() == io::ErrorKind::NotFound => { - let err = format!("Sending {} to {} failed ({}).", path.display(), cl, error.to_string()); + let err = format!("Sending {} to {} failed ({}).", path.display(), cl, error); self.tftp.send_error(socket, 1, "File not found")?; return Err(io::Error::new(io::ErrorKind::NotFound, err)); } Err(error) => { - let err = format!("Sending {} to {} failed ({}).", path.display(), cl, error.to_string()); + let err = format!("Sending {} to {} failed ({}).", path.display(), cl, error); self.tftp.send_error(socket, 2, "Permission denied")?; return Err(io::Error::new(io::ErrorKind::PermissionDenied, err)); } @@ -176,7 +176,7 @@ impl Tftpd { match self.tftp.send_file(socket, &mut file) { Ok(_) => Ok(format!("Sent {} to {}.", path.display(), cl)), Err(err) => { - let error = format!("Sending {} to {} failed ({}).", path.display(), cl, err.to_string()); + let error = format!("Sending {} to {} failed ({}).", path.display(), cl, err); Err(std::io::Error::new(err.kind(), error)) } } |
