about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-12-03 18:07:15 +0800
committerGitHub <noreply@github.com>2018-12-03 18:07:15 +0800
commitca98bce303a2ed8f9b21eb6d2e602e76a7c00754 (patch)
tree9a38c8fa276be6a7618fbc012a0f09bd2ba0ad4f /src/libstd/sys/windows
parent71d76bec1e162c90def081494add1150f47e598c (diff)
parente7e96921c28ab8d29b6ee61053152eead822f09a (diff)
downloadrust-ca98bce303a2ed8f9b21eb6d2e602e76a7c00754.tar.gz
rust-ca98bce303a2ed8f9b21eb6d2e602e76a7c00754.zip
Rollup merge of #56419 - mark-i-m:remove-try, r=Centril
Remove some uses of try!
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/stdio.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/windows/stdio.rs b/src/libstd/sys/windows/stdio.rs
index 81b89da21d3..c3a94698a0f 100644
--- a/src/libstd/sys/windows/stdio.rs
+++ b/src/libstd/sys/windows/stdio.rs
@@ -48,7 +48,7 @@ pub fn get(handle: c::DWORD) -> io::Result<Output> {
 }
 
 fn write(handle: c::DWORD, data: &[u8]) -> io::Result<usize> {
-    let handle = match try!(get(handle)) {
+    let handle = match get(handle)? {
         Output::Console(c) => c,
         Output::Pipe(p) => {
             let handle = Handle::new(p);
@@ -99,7 +99,7 @@ impl Stdin {
     }
 
     pub fn read(&self, buf: &mut [u8]) -> io::Result<usize> {
-        let handle = match try!(get(c::STD_INPUT_HANDLE)) {
+        let handle = match get(c::STD_INPUT_HANDLE)? {
             Output::Console(c) => c,
             Output::Pipe(p) => {
                 let handle = Handle::new(p);