File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -530,20 +530,13 @@ impl PyInt {
530530 match precision {
531531 OptionalArg :: Missing => ( ) ,
532532 OptionalArg :: Present ( ref value) => {
533- if !vm. is_none ( value) {
534- // Only accept int type ndigits
535- let _ndigits = value. payload_if_subclass :: < PyInt > ( vm) . ok_or_else ( || {
536- vm. new_type_error ( format ! (
537- "'{}' object cannot be interpreted as an integer" ,
538- value. class( ) . name( )
539- ) )
540- } ) ?;
541- } else {
542- return Err ( vm. new_type_error ( format ! (
533+ // Only accept int type ndigits
534+ let _ndigits = value. payload_if_subclass :: < PyInt > ( vm) . ok_or_else ( || {
535+ vm. new_type_error ( format ! (
543536 "'{}' object cannot be interpreted as an integer" ,
544537 value. class( ) . name( )
545- ) ) ) ;
546- }
538+ ) )
539+ } ) ? ;
547540 }
548541 }
549542 Ok ( zelf)
You can’t perform that action at this time.
0 commit comments