@@ -97,7 +97,7 @@ impl<'a> VM<'a> {
9797 . map( |x| self . repr( * x) ) . collect:: <Vec <_>>( ) . join( ", " ) ) ,
9898 HeapObj :: Slice ( s, e, st) => format ! ( "slice({}, {}, {})" ,
9999 self . display( * s) , self . display( * e) , self . display( * st) ) ,
100- HeapObj :: BigInt ( b) => b. to_decimal ( ) ,
100+ HeapObj :: BigInt ( b) => b. to_decimal ( ) ,
101101 HeapObj :: Type ( name) => format ! ( "<class '{}'>" , name)
102102 }
103103 }
@@ -127,7 +127,8 @@ impl<'a> VM<'a> {
127127 Err ( VmErr :: Type ( format ! ( "'<' not supported between '{}' and '{}'" , self . type_name( a) , self . type_name( b) ) ) )
128128 }
129129
130- pub fn contains ( & self , container : Val , item : Val ) -> bool { // Checks item presence in list, tuple, dict, set, or substring in str
130+ // Checks item presence in list, tuple, dict, set, or substring in string.
131+ pub fn contains ( & self , container : Val , item : Val ) -> bool {
131132 if !container. is_heap ( ) { return false ; }
132133 match self . heap . get ( container) {
133134 HeapObj :: List ( v) => v. borrow ( ) . iter ( ) . any ( |x| self . eq_vals ( * x, item) ) ,
@@ -216,10 +217,6 @@ impl<'a> VM<'a> {
216217 None
217218 }
218219
219- pub ( crate ) fn is_int_type ( & self , v : Val ) -> bool {
220- v. is_int ( ) || ( v. is_heap ( ) && matches ! ( self . heap. get( v) , HeapObj :: BigInt ( _) ) )
221- }
222-
223220 pub ( crate ) fn bigint_to_val ( & mut self , b : BigInt ) -> Result < Val , VmErr > {
224221 if let Some ( i) = b. to_i64_checked ( ) {
225222 if i >= Val :: INT_MIN && i <= Val :: INT_MAX { return Ok ( Val :: int ( i) ) ; }
0 commit comments