diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-08-26 00:48:25 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2020-08-26 01:13:20 +0200 |
commit | aead9dc91eaa51922c8f93daa38d5d18d73e3890 (patch) | |
tree | 01df8f95e41586ce816d0c08b17c6c53d75425a1 /cli/ops/io.rs | |
parent | 9bfb0df805719cb3f022a5b5d9f9d898ae954c2e (diff) |
Remove some more unnecessary 'to_string()' calls (#7190)
Diffstat (limited to 'cli/ops/io.rs')
-rw-r--r-- | cli/ops/io.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cli/ops/io.rs b/cli/ops/io.rs index 6b97f542c..14d32a39b 100644 --- a/cli/ops/io.rs +++ b/cli/ops/io.rs @@ -117,7 +117,7 @@ fn get_stdio_stream( } fn no_buffer_specified() -> ErrBox { - ErrBox::type_error("no buffer specified".to_string()) + ErrBox::type_error("no buffer specified") } #[cfg(unix)] @@ -262,9 +262,9 @@ pub fn op_read( .map(|n: usize| n as i32) .map_err(ErrBox::from) } - Err(_) => Err(ErrBox::type_error( - "sync read not allowed on this resource".to_string(), - )), + Err(_) => { + Err(ErrBox::type_error("sync read not allowed on this resource")) + } }) }) } else { @@ -383,9 +383,9 @@ pub fn op_write( .map(|nwritten: usize| nwritten as i32) .map_err(ErrBox::from) } - Err(_) => Err(ErrBox::type_error( - "sync read not allowed on this resource".to_string(), - )), + Err(_) => { + Err(ErrBox::type_error("sync read not allowed on this resource")) + } }) }) } else { |