Update serde to 0.9 (fixes #15325)

This commit is contained in:
Anthony Ramine 2017-02-10 02:35:26 +01:00
parent 26d6c96b18
commit fe3f4ff0c2
73 changed files with 630 additions and 604 deletions

View file

@ -5,10 +5,10 @@
/// General actor system infrastructure.
use devtools_traits::PreciseTime;
use serde_json::Value;
use serde_json::{Map, Value};
use std::any::Any;
use std::cell::{Cell, RefCell};
use std::collections::{BTreeMap, HashMap};
use std::collections::HashMap;
use std::mem::replace;
use std::net::TcpStream;
use std::sync::{Arc, Mutex};
@ -26,7 +26,7 @@ pub trait Actor: Any + ActorAsAny {
fn handle_message(&self,
registry: &ActorRegistry,
msg_type: &str,
msg: &BTreeMap<String, Value>,
msg: &Map<String, Value>,
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()>;
fn name(&self) -> String;
}
@ -150,7 +150,7 @@ impl ActorRegistry {
/// Attempt to process a message as directed by its `to` property. If the actor is not
/// found or does not indicate that it knew how to process the message, ignore the failure.
pub fn handle_message(&mut self,
msg: &BTreeMap<String, Value>,
msg: &Map<String, Value>,
stream: &mut TcpStream)
-> Result<(), ()> {
let to = msg.get("to").unwrap().as_str().unwrap();