File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ impl Environment {
203203 depth : depth - 1 ,
204204 slot,
205205 } ) ,
206- ResolvedVar :: Global { slot } => todo ! ( "probably disallow taking global variables " ) ,
206+ ResolvedVar :: Global { .. } => panic ! ( "cannot take global variable from environment " ) ,
207207 }
208208 }
209209
Original file line number Diff line number Diff line change @@ -77,13 +77,12 @@ mod inner {
7777 }
7878 }
7979
80- // TODO: adding this function breaks the new function resolution
81- // #[function(name = "-=")]
82- // pub fn difference_assign(lhs: &mut MapRepr, rhs: &mut MapRepr) {
83- // let left_map: &mut HashMap<Value, Value> = &mut lhs.borrow_mut();
84- //
85- // left_map.difference(&*rhs.borrow());
86- // }
80+ #[ function( name = "-=" ) ]
81+ pub fn difference_assign ( lhs : & mut MapRepr , rhs : & mut MapRepr ) {
82+ let left_map: & mut HashMap < Value , Value > = & mut lhs. borrow_mut ( ) ;
83+
84+ left_map. difference ( & * rhs. borrow ( ) ) ;
85+ }
8786
8887 #[ function( name = "~=" ) ]
8988 pub fn symmetric_difference_assign ( lhs : & mut MapRepr , rhs : & mut MapRepr ) {
You can’t perform that action at this time.
0 commit comments