Skip to content

Commit

Permalink
added code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik committed May 16, 2024
1 parent 5087c74 commit 1c76406
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bridges/relays/client-substrate/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ pub fn is_ancient_block<N: From<u32> + PartialOrd + Saturating>(block: N, best:
/// Opaque justifications subscription type.
pub struct Subscription<T>(
pub(crate) Mutex<futures::channel::mpsc::Receiver<Option<T>>>,
// The following field is not explicitly used by the code. But when it is dropped,
// the bakground task receives a shutdown signal.
#[allow(dead_code)] pub(crate) futures::channel::oneshot::Sender<()>,
);

Expand Down Expand Up @@ -856,6 +858,7 @@ impl<T: DeserializeOwned> Subscription<T> {
match item {
Some(item) => Some((item, Some(this))),
None => {
// let's make it explicit here
let _ = this.1.send(());
None
},
Expand Down

0 comments on commit 1c76406

Please sign in to comment.