]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys/windows/stdio_uwp.rs
Remove result type from raw standard streams constructors
[rust.git] / library / std / src / sys / windows / stdio_uwp.rs
index 5bdabf6d4b78efdaa81c74e514ce8076e459bf5e..0016f5dcd011240f992ea109e7f3bebd09e84d64 100644 (file)
@@ -30,8 +30,8 @@ fn write(handle_id: c::DWORD, data: &[u8]) -> io::Result<usize> {
 }
 
 impl Stdin {
-    pub fn new() -> io::Result<Stdin> {
-        Ok(Stdin {})
+    pub fn new() -> Stdin {
+        Stdin {}
     }
 }
 
@@ -44,8 +44,8 @@ fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
 }
 
 impl Stdout {
-    pub fn new() -> io::Result<Stdout> {
-        Ok(Stdout)
+    pub fn new() -> Stdout {
+        Stdout
     }
 }
 
@@ -60,8 +60,8 @@ fn flush(&mut self) -> io::Result<()> {
 }
 
 impl Stderr {
-    pub fn new() -> io::Result<Stderr> {
-        Ok(Stderr)
+    pub fn new() -> Stderr {
+        Stderr
     }
 }
 
@@ -80,5 +80,5 @@ pub fn is_ebadf(err: &io::Error) -> bool {
 }
 
 pub fn panic_output() -> Option<impl io::Write> {
-    Stderr::new().ok()
+    Some(Stderr::new())
 }