diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-08-20 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-08-21 13:17:20 +0200 |
| commit | 479c23bb493e4ea801c125cfc54e70723a9aeeb5 (patch) | |
| tree | 0e55f5ac72d4f5665022c17811801add186e7160 /library/std/src/sys/sgx/stdio.rs | |
| parent | 32cb8d40eb4382bd67510c0f06fc855063f0fde8 (diff) | |
| download | rust-479c23bb493e4ea801c125cfc54e70723a9aeeb5.tar.gz rust-479c23bb493e4ea801c125cfc54e70723a9aeeb5.zip | |
Remove result type from raw standard streams constructors
Raw standard streams constructors are infallible. Remove unnecessary result type.
Diffstat (limited to 'library/std/src/sys/sgx/stdio.rs')
| -rw-r--r-- | library/std/src/sys/sgx/stdio.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/std/src/sys/sgx/stdio.rs b/library/std/src/sys/sgx/stdio.rs index 716c174bd53..d771a39ea85 100644 --- a/library/std/src/sys/sgx/stdio.rs +++ b/library/std/src/sys/sgx/stdio.rs @@ -19,8 +19,8 @@ fn with_std_fd<F: FnOnce(&FileDesc) -> R, R>(fd: abi::Fd, f: F) -> R { } impl Stdin { - pub fn new() -> io::Result<Stdin> { - Ok(Stdin(())) + pub fn new() -> Stdin { + Stdin(()) } } @@ -31,8 +31,8 @@ impl io::Read for Stdin { } impl Stdout { - pub fn new() -> io::Result<Stdout> { - Ok(Stdout(())) + pub fn new() -> Stdout { + Stdout(()) } } @@ -47,8 +47,8 @@ impl io::Write for Stdout { } impl Stderr { - pub fn new() -> io::Result<Stderr> { - Ok(Stderr(())) + pub fn new() -> Stderr { + Stderr(()) } } |
