Fix some rustc/clippy warnings. (#895)

This commit is contained in:
Toralf Wittner
2019-01-30 15:41:54 +01:00
committed by GitHub
parent a77da73010
commit e23b2733e2
25 changed files with 63 additions and 60 deletions

View File

@ -35,7 +35,7 @@ impl TopicHash {
/// Builds a new `TopicHash` from the given hash.
#[inline]
pub fn from_raw(hash: String) -> TopicHash {
TopicHash { hash: hash }
TopicHash { hash }
}
#[inline]
@ -94,7 +94,7 @@ impl TopicBuilder {
let mut builder = rpc_proto::TopicDescriptor::new();
builder.set_name(name.into());
TopicBuilder { builder: builder }
TopicBuilder { builder }
}
/// Turns the builder into an actual `Topic`.