refactor: simplify a From impl for PubsubHttpApiMessage
Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
parent
2603532027
commit
a8103cb14c
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user