File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ pub struct PyDictTracker {
2424 key : Relocatable ,
2525}
2626
27+ impl Default for PyDictManager {
28+ fn default ( ) -> Self {
29+ PyDictManager :: new ( )
30+ }
31+ }
32+
2733#[ pymethods]
2834impl PyDictManager {
2935 #[ new]
@@ -139,13 +145,13 @@ impl PyDictTracker {
139145 val : PyMaybeRelocatable ,
140146 py : Python ,
141147 ) -> PyResult < ( ) > {
142- match ( & key, val) {
148+ match ( & key, & val) {
143149 ( PyMaybeRelocatable :: Int ( key) , PyMaybeRelocatable :: Int ( val) ) => {
144150 self . manager
145151 . borrow_mut ( )
146152 . get_tracker_mut ( & self . key )
147153 . map_err ( to_py_error) ?
148- . insert_value ( & key, & val) ;
154+ . insert_value ( key, val) ;
149155
150156 Ok ( ( ) )
151157 }
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ impl PyIds {
100100
101101 if self
102102 . struct_types
103- . contains_key ( cairo_type. trim_end_matches ( "*" ) )
103+ . contains_key ( cairo_type. trim_end_matches ( '*' ) )
104104 {
105105 let addr =
106106 compute_addr_from_reference ( hint_ref, & self . vm . borrow ( ) , & self . ap_tracking ) ?;
@@ -115,7 +115,7 @@ impl PyIds {
115115 return Ok ( PyTypedId {
116116 vm : self . vm . clone ( ) ,
117117 hint_value : dereferenced_addr,
118- cairo_type : cairo_type. trim_end_matches ( "*" ) . to_string ( ) ,
118+ cairo_type : cairo_type. trim_end_matches ( '*' ) . to_string ( ) ,
119119 struct_types : Rc :: clone ( & self . struct_types ) ,
120120 }
121121 . into_py ( py) ) ;
You can’t perform that action at this time.
0 commit comments