@@ -390,7 +390,7 @@ pub(crate) fn default_read_to_end<R: Read + ?Sized>(
390
390
let mut cursor = read_buf. unfilled ( ) ;
391
391
match r. read_buf ( cursor. reborrow ( ) ) {
392
392
Ok ( ( ) ) => { }
393
- Err ( e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
393
+ Err ( e) if e. is_interrupted ( ) => continue ,
394
394
Err ( e) => return Err ( e) ,
395
395
}
396
396
@@ -421,7 +421,7 @@ pub(crate) fn default_read_to_end<R: Read + ?Sized>(
421
421
buf. extend_from_slice ( & probe[ ..n] ) ;
422
422
break ;
423
423
}
424
- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
424
+ Err ( ref e) if e. is_interrupted ( ) => continue ,
425
425
Err ( e) => return Err ( e) ,
426
426
}
427
427
}
@@ -470,7 +470,7 @@ pub(crate) fn default_read_exact<R: Read + ?Sized>(this: &mut R, mut buf: &mut [
470
470
let tmp = buf;
471
471
buf = & mut tmp[ n..] ;
472
472
}
473
- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => { }
473
+ Err ( ref e) if e. is_interrupted ( ) => { }
474
474
Err ( e) => return Err ( e) ,
475
475
}
476
476
}
@@ -860,7 +860,7 @@ pub trait Read {
860
860
let prev_written = cursor. written ( ) ;
861
861
match self . read_buf ( cursor. reborrow ( ) ) {
862
862
Ok ( ( ) ) => { }
863
- Err ( e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
863
+ Err ( e) if e. is_interrupted ( ) => continue ,
864
864
Err ( e) => return Err ( e) ,
865
865
}
866
866
@@ -1579,7 +1579,7 @@ pub trait Write {
1579
1579
) ) ;
1580
1580
}
1581
1581
Ok ( n) => buf = & buf[ n..] ,
1582
- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => { }
1582
+ Err ( ref e) if e. is_interrupted ( ) => { }
1583
1583
Err ( e) => return Err ( e) ,
1584
1584
}
1585
1585
}
@@ -1943,7 +1943,7 @@ fn read_until<R: BufRead + ?Sized>(r: &mut R, delim: u8, buf: &mut Vec<u8>) -> R
1943
1943
let ( done, used) = {
1944
1944
let available = match r. fill_buf ( ) {
1945
1945
Ok ( n) => n,
1946
- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
1946
+ Err ( ref e) if e. is_interrupted ( ) => continue ,
1947
1947
Err ( e) => return Err ( e) ,
1948
1948
} ;
1949
1949
match memchr:: memchr ( delim, available) {
@@ -2734,7 +2734,7 @@ impl<R: Read> Iterator for Bytes<R> {
2734
2734
return match self . inner . read ( slice:: from_mut ( & mut byte) ) {
2735
2735
Ok ( 0 ) => None ,
2736
2736
Ok ( ..) => Some ( Ok ( byte) ) ,
2737
- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
2737
+ Err ( ref e) if e. is_interrupted ( ) => continue ,
2738
2738
Err ( e) => Some ( Err ( e) ) ,
2739
2739
} ;
2740
2740
}
0 commit comments