Skip to content

Commit

Permalink
Removed the last usage of the old box syntax.
Browse files Browse the repository at this point in the history
This fixes the build on the current nightly (2015-03-07) without requiring the feature gate to be enabled.
  • Loading branch information
ryan-scott-dev committed Mar 7, 2015
1 parent 2c281df commit e61d1d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ macro_rules! callback(
}

pub fn set<UserData: 'static>(f: ::$Callback<UserData>) {
let mut boxed_cb = Some(box f as Box<Object<Args> + 'static>);
let mut boxed_cb = Some(Box::new(f) as Box<Object<Args> + 'static>);
CALLBACK_KEY.with(|cb| {
*cb.borrow_mut() = boxed_cb.take();
});
Expand Down

0 comments on commit e61d1d3

Please sign in to comment.