@@ -390,7 +390,7 @@ pub(crate) fn default_read_to_end<R: Read + ?Sized>(
390390 let mut cursor = read_buf. unfilled ( ) ;
391391 match r. read_buf ( cursor. reborrow ( ) ) {
392392 Ok ( ( ) ) => { }
393- Err ( e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
393+ Err ( e) if e. is_interrupted ( ) => continue ,
394394 Err ( e) => return Err ( e) ,
395395 }
396396
@@ -421,7 +421,7 @@ pub(crate) fn default_read_to_end<R: Read + ?Sized>(
421421 buf. extend_from_slice ( & probe[ ..n] ) ;
422422 break ;
423423 }
424- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
424+ Err ( ref e) if e. is_interrupted ( ) => continue ,
425425 Err ( e) => return Err ( e) ,
426426 }
427427 }
@@ -470,7 +470,7 @@ pub(crate) fn default_read_exact<R: Read + ?Sized>(this: &mut R, mut buf: &mut [
470470 let tmp = buf;
471471 buf = & mut tmp[ n..] ;
472472 }
473- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => { }
473+ Err ( ref e) if e. is_interrupted ( ) => { }
474474 Err ( e) => return Err ( e) ,
475475 }
476476 }
@@ -860,7 +860,7 @@ pub trait Read {
860860 let prev_written = cursor. written ( ) ;
861861 match self . read_buf ( cursor. reborrow ( ) ) {
862862 Ok ( ( ) ) => { }
863- Err ( e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
863+ Err ( e) if e. is_interrupted ( ) => continue ,
864864 Err ( e) => return Err ( e) ,
865865 }
866866
@@ -1579,7 +1579,7 @@ pub trait Write {
15791579 ) ) ;
15801580 }
15811581 Ok ( n) => buf = & buf[ n..] ,
1582- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => { }
1582+ Err ( ref e) if e. is_interrupted ( ) => { }
15831583 Err ( e) => return Err ( e) ,
15841584 }
15851585 }
@@ -1943,7 +1943,7 @@ fn read_until<R: BufRead + ?Sized>(r: &mut R, delim: u8, buf: &mut Vec<u8>) -> R
19431943 let ( done, used) = {
19441944 let available = match r. fill_buf ( ) {
19451945 Ok ( n) => n,
1946- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
1946+ Err ( ref e) if e. is_interrupted ( ) => continue ,
19471947 Err ( e) => return Err ( e) ,
19481948 } ;
19491949 match memchr:: memchr ( delim, available) {
@@ -2734,7 +2734,7 @@ impl<R: Read> Iterator for Bytes<R> {
27342734 return match self . inner . read ( slice:: from_mut ( & mut byte) ) {
27352735 Ok ( 0 ) => None ,
27362736 Ok ( ..) => Some ( Ok ( byte) ) ,
2737- Err ( ref e) if e. kind ( ) == ErrorKind :: Interrupted => continue ,
2737+ Err ( ref e) if e. is_interrupted ( ) => continue ,
27382738 Err ( e) => Some ( Err ( e) ) ,
27392739 } ;
27402740 }
0 commit comments