diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-10-11 23:12:43 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-10-12 12:10:56 +0200 |
commit | aa5761a5fb8c014b4f0e6e77f95a86299d8d94ef (patch) | |
tree | 5a4549541437b62f09b844379b60a4b50fe6de8b /components/devtools/lib.rs | |
parent | 796a8dc618e3bfd2a7523e84f95c9ef59693932a (diff) | |
download | servo-aa5761a5fb8c014b4f0e6e77f95a86299d8d94ef.tar.gz servo-aa5761a5fb8c014b4f0e6e77f95a86299d8d94ef.zip |
Remove usage of unstable box syntax, except in the script crate
… because there’s a lot of it,
and script still uses any other unstable features anyway.
Diffstat (limited to 'components/devtools/lib.rs')
-rw-r--r-- | components/devtools/lib.rs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/components/devtools/lib.rs b/components/devtools/lib.rs index 6a25696eaed..86e77d21d19 100644 --- a/components/devtools/lib.rs +++ b/components/devtools/lib.rs @@ -12,7 +12,6 @@ #![allow(non_snake_case)] #![deny(unsafe_code)] -#![feature(box_syntax)] extern crate devtools_traits; extern crate hyper; @@ -143,9 +142,9 @@ fn run_server(sender: Sender<DevtoolsControlMsg>, let mut registry = ActorRegistry::new(); - let root = box RootActor { + let root = Box::new(RootActor { tabs: vec!(), - }; + }); registry.register(root); registry.find::<RootActor>("root"); @@ -262,17 +261,17 @@ fn run_server(sender: Sender<DevtoolsControlMsg>, id: id, }; actor_workers.insert((pipeline, id), worker.name.clone()); - actors.register(box worker); + actors.register(Box::new(worker)); } actor_pipelines.insert(pipeline, tab.name.clone()); - actors.register(box tab); - actors.register(box console); - actors.register(box inspector); - actors.register(box timeline); - actors.register(box profiler); - actors.register(box performance); - actors.register(box thread); + actors.register(Box::new(tab)); + actors.register(Box::new(console)); + actors.register(Box::new(inspector)); + actors.register(Box::new(timeline)); + actors.register(Box::new(profiler)); + actors.register(Box::new(performance)); + actors.register(Box::new(thread)); } fn handle_console_message(actors: Arc<Mutex<ActorRegistry>>, @@ -467,7 +466,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>, let actor_name = actors.new_name("netevent"); let actor = NetworkEventActor::new(actor_name.clone()); entry.insert(actor_name.clone()); - actors.register(box actor); + actors.register(Box::new(actor)); actor_name } } |