Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Commit

Permalink
Cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
timotree3 committed Oct 21, 2019
1 parent eb018f0 commit eae08db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 1 addition & 3 deletions crates/conductor_lib/src/conductor/broadcaster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ impl Broadcaster {
match self {
Broadcaster::Ws(sender) => sender
.send(ws::Message::Text(msg.into().to_string()))
.map_err(|e| {
HolochainError::ErrorGeneric(format!("Broadcaster::Ws -- {}", e))
})?,
.map_err(|e| HolochainError::ErrorGeneric(format!("Broadcaster::Ws -- {}", e)))?,
Broadcaster::Noop => (),
}
Ok(())
Expand Down
5 changes: 2 additions & 3 deletions crates/conductor_lib/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -884,9 +884,8 @@ pub fn load_configuration<'a, T>(toml: &'a str) -> HcResult<T>
where
T: Deserialize<'a>,
{
toml::from_str::<T>(toml).map_err(|e| {
HolochainError::IoError(format!("Error loading configuration: {}", e))
})
toml::from_str::<T>(toml)
.map_err(|e| HolochainError::IoError(format!("Error loading configuration: {}", e)))
}

pub fn serialize_configuration(config: &Configuration) -> HcResult<String> {
Expand Down
4 changes: 1 addition & 3 deletions crates/net/src/connection/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ impl<'a> From<&'a NamedBinaryData> for Protocol {
let sub: NamedBinaryData = rmp_serde::from_slice(&nb.data).unwrap();
Protocol::NamedBinary(sub)
}
b"json" => Protocol::Json(JsonString::from_json(
&String::from_utf8_lossy(&nb.data),
)),
b"json" => Protocol::Json(JsonString::from_json(&String::from_utf8_lossy(&nb.data))),
b"ping" => {
let sub: PingData = rmp_serde::from_slice(&nb.data).unwrap();
Protocol::Ping(sub)
Expand Down

0 comments on commit eae08db

Please sign in to comment.