]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys/hermit/stdio.rs
Remove result type from raw standard streams constructors
[rust.git] / library / std / src / sys / hermit / stdio.rs
index f3654ee38716c7c54ab09e65f0230606465ba556..359ea13c2befc08be5033ac81928eab5549a3f47 100644 (file)
@@ -7,8 +7,8 @@
 pub struct Stderr;
 
 impl Stdin {
-    pub fn new() -> io::Result<Stdin> {
-        Ok(Stdin)
+    pub fn new() -> Stdin {
+        Stdin
     }
 }
 
@@ -28,8 +28,8 @@ fn is_read_vectored(&self) -> bool {
 }
 
 impl Stdout {
-    pub fn new() -> io::Result<Stdout> {
-        Ok(Stdout)
+    pub fn new() -> Stdout {
+        Stdout
     }
 }
 
@@ -69,8 +69,8 @@ fn flush(&mut self) -> io::Result<()> {
 }
 
 impl Stderr {
-    pub fn new() -> io::Result<Stderr> {
-        Ok(Stderr)
+    pub fn new() -> Stderr {
+        Stderr
     }
 }
 
@@ -116,5 +116,5 @@ pub fn is_ebadf(_err: &io::Error) -> bool {
 }
 
 pub fn panic_output() -> Option<impl io::Write> {
-    Stderr::new().ok()
+    Some(Stderr::new())
 }