@@ -96,7 +96,7 @@ impl AsLocItem for PyAny {
9696 fn as_loc_item ( & self ) -> LocItem {
9797 if let Ok ( py_str) = self . downcast :: < PyString > ( ) {
9898 py_str. to_string_lossy ( ) . as_ref ( ) . into ( )
99- } else if let Ok ( key_int) = extract_i64 ( self ) {
99+ } else if let Some ( key_int) = extract_i64 ( self ) {
100100 key_int. into ( )
101101 } else {
102102 safe_repr ( self ) . to_string ( ) . into ( )
@@ -292,7 +292,7 @@ impl<'a> Input<'a> for PyAny {
292292 if !strict {
293293 if let Some ( cow_str) = maybe_as_string ( self , ErrorTypeDefaults :: BoolParsing ) ? {
294294 return str_as_bool ( self , & cow_str) . map ( ValidationMatch :: lax) ;
295- } else if let Ok ( int) = extract_i64 ( self ) {
295+ } else if let Some ( int) = extract_i64 ( self ) {
296296 return int_as_bool ( self , int) . map ( ValidationMatch :: lax) ;
297297 } else if let Ok ( float) = self . extract :: < f64 > ( ) {
298298 if let Ok ( int) = float_as_int ( self , float) {
@@ -635,7 +635,7 @@ impl<'a> Input<'a> for PyAny {
635635 bytes_as_time ( self , py_bytes. as_bytes ( ) , microseconds_overflow_behavior)
636636 } else if PyBool :: is_exact_type_of ( self ) {
637637 Err ( ValError :: new ( ErrorTypeDefaults :: TimeType , self ) )
638- } else if let Ok ( int) = extract_i64 ( self ) {
638+ } else if let Some ( int) = extract_i64 ( self ) {
639639 int_as_time ( self , int, 0 )
640640 } else if let Ok ( float) = self . extract :: < f64 > ( ) {
641641 float_as_time ( self , float)
@@ -669,7 +669,7 @@ impl<'a> Input<'a> for PyAny {
669669 bytes_as_datetime ( self , py_bytes. as_bytes ( ) , microseconds_overflow_behavior)
670670 } else if PyBool :: is_exact_type_of ( self ) {
671671 Err ( ValError :: new ( ErrorTypeDefaults :: DatetimeType , self ) )
672- } else if let Ok ( int) = extract_i64 ( self ) {
672+ } else if let Some ( int) = extract_i64 ( self ) {
673673 int_as_datetime ( self , int, 0 )
674674 } else if let Ok ( float) = self . extract :: < f64 > ( ) {
675675 float_as_datetime ( self , float)
@@ -706,7 +706,7 @@ impl<'a> Input<'a> for PyAny {
706706 bytes_as_timedelta ( self , str. as_bytes ( ) , microseconds_overflow_behavior)
707707 } else if let Ok ( py_bytes) = self . downcast :: < PyBytes > ( ) {
708708 bytes_as_timedelta ( self , py_bytes. as_bytes ( ) , microseconds_overflow_behavior)
709- } else if let Ok ( int) = extract_i64 ( self ) {
709+ } else if let Some ( int) = extract_i64 ( self ) {
710710 Ok ( int_as_duration ( self , int) ?. into ( ) )
711711 } else if let Ok ( float) = self . extract :: < f64 > ( ) {
712712 Ok ( float_as_duration ( self , float) ?. into ( ) )
0 commit comments