refactor: simplify a From impl for PubsubHttpApiMessage

Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
ljedrz 2020-06-26 15:27:07 +02:00
parent 2603532027
commit a8103cb14c

View File

@ -318,11 +318,11 @@ struct PubsubHttpApiMessage {
topics: Vec<String>,
}
impl<'a, T> From<&'a T> for PubsubHttpApiMessage
impl<T> From<T> for PubsubHttpApiMessage
where
T: AsRef<ipfs::PubsubMessage>,
{
fn from(msg: &'a T) -> Self {
fn from(msg: T) -> Self {
use multibase::Base::Base64Pad;
let msg = msg.as_ref();