Update some code that's feature-gated under core.

This commit is contained in:
Ms2ger 2015-03-21 18:44:39 +01:00
parent 29a36adbe7
commit ba87666cdb
33 changed files with 104 additions and 107 deletions

View file

@ -80,7 +80,7 @@ impl Actor for TabActor {
msg_type: &String,
_msg: &json::Object,
stream: &mut TcpStream) -> Result<bool, ()> {
Ok(match msg_type.as_slice() {
Ok(match &**msg_type {
"reconfigure" => {
stream.write_json_packet(&ReconfigureReply { from: self.name() });
true
@ -97,7 +97,7 @@ impl Actor for TabActor {
javascriptEnabled: true,
traits: TabTraits,
};
let console_actor = registry.find::<ConsoleActor>(self.console.as_slice());
let console_actor = registry.find::<ConsoleActor>(&self.console);
console_actor.streams.borrow_mut().push(stream.clone());
stream.write_json_packet(&msg);
console_actor.script_chan.send(
@ -112,7 +112,7 @@ impl Actor for TabActor {
from: self.name(),
__type__: "detached".to_string(),
};
let console_actor = registry.find::<ConsoleActor>(self.console.as_slice());
let console_actor = registry.find::<ConsoleActor>(&self.console);
console_actor.streams.borrow_mut().pop();
stream.write_json_packet(&msg);
console_actor.script_chan.send(