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

@ -93,13 +93,13 @@ impl ActorRegistry {
}
pub fn register_script_actor(&self, script_id: String, actor: String) {
println!("registering {} ({})", actor.as_slice(), script_id.as_slice());
println!("registering {} ({})", actor, script_id);
let mut script_actors = self.script_actors.borrow_mut();
script_actors.insert(script_id, actor);
}
pub fn script_to_actor(&self, script_id: String) -> String {
if script_id.as_slice() == "" {
if script_id.is_empty() {
return "".to_string();
}
self.script_actors.borrow().get(&script_id).unwrap().to_string()
@ -111,8 +111,8 @@ impl ActorRegistry {
pub fn actor_to_script(&self, actor: String) -> String {
for (key, value) in self.script_actors.borrow().iter() {
println!("checking {}", value.as_slice());
if value.as_slice() == actor.as_slice() {
println!("checking {}", value);
if *value == actor {
return key.to_string();
}
}