Skip to content

Commit d51c3fc

Browse files
committed
chore: add todo comments
1 parent 9e0a2c8 commit d51c3fc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

iroh-willow/src/engine/actor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@ impl<S: Storage> Actor<S> {
546546
} => {
547547
let store = self.store.clone();
548548
self.tasks.spawn_local(async move {
549+
// TODO: We wouldn't need to manually forward in a loop here if subscribe_area took a sender
550+
// instead of returning a stream.
549551
let mut stream = store.entries().subscribe_area(namespace, area, params);
550552
while let Some(event) = stream.next().await {
551553
if sender.send(event).await.is_err() {

iroh-willow/src/proto/data_model.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ impl willow_data_model::PayloadDigest for PayloadDigest {}
8282
pub type Path = willow_data_model::Path<MAX_COMPONENT_LENGTH, MAX_COMPONENT_COUNT, MAX_PATH_LENGTH>;
8383

8484
/// Extension methods for [`Path`].
85+
// TODO: Upstream the methods to willow-rs and remove the extension trait.
8586
pub trait PathExt {
8687
/// Creates a new path from a slice of bytes.
8788
fn from_bytes(slices: &[&[u8]]) -> Result<Path, InvalidPathError2>;
@@ -106,7 +107,7 @@ impl PathExt for Path {
106107
}
107108

108109
#[derive(Debug, thiserror::Error)]
109-
/// An error arising from trying to construct a invalid [`Path`] from valid components.
110+
/// An error arising from trying to construct a invalid [`Path`] from potentially invalid components.
110111
pub enum InvalidPathError2 {
111112
/// One of the path's component is too large.
112113
#[error("One of the path's component is too large.")]
@@ -143,6 +144,7 @@ pub type Entry = willow_data_model::Entry<
143144
>;
144145

145146
/// Extension methods for [`Entry`].
147+
// TODO: Decide what to upstream to willow-rs.
146148
pub trait EntryExt {
147149
/// Encodes the entry into a bytestring.
148150
fn encode_to_vec(&self) -> Vec<u8>;

0 commit comments

Comments
 (0)