Skip to content

Commit 8755609

Browse files
committed
Update pubsub_unsubscribe()
1 parent c652164 commit 8755609

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

rust/hermes-ipfs/src/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ pub struct MessageId(pub PubsubMessageId);
4242
pub struct IpfsBuilder<N>(UninitializedIpfs<N>)
4343
where N: NetworkBehaviour<ToSwarm = Infallible> + Send + Sync;
4444

45-
impl<N> IpfsBuilder<N> where N: NetworkBehaviour<ToSwarm = Infallible> + Send + Sync {
45+
impl<N> IpfsBuilder<N>
46+
where N: NetworkBehaviour<ToSwarm = Infallible> + Send + Sync
47+
{
4648
#[must_use]
4749
/// Create a new` IpfsBuilder`.
4850
pub fn new() -> Self {
@@ -496,19 +498,14 @@ impl HermesIpfs {
496498
///
497499
/// * `topic` - `impl Into<String>`
498500
///
499-
/// ## Returns
500-
///
501-
/// * `bool`
502-
///
503501
/// ## Errors
504502
///
505503
/// Returns error if unable to unsubscribe from pubsub topic.
506504
pub async fn pubsub_unsubscribe(
507505
&self,
508506
topic: impl Into<String> + IntoGossipsubTopic,
509-
) -> anyhow::Result<bool> {
510-
//self.node.pubsub_unsubscribe(topic).await
511-
todo!()
507+
) -> anyhow::Result<()> {
508+
self.node.pubsub_unsubscribe(topic).await
512509
}
513510

514511
/// Publishes a message to a pubsub topic.

0 commit comments

Comments
 (0)