diff options
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 { |