diff --git a/examples/poll.rs b/examples/poll.rs index 04e5f6d..1596f0d 100644 --- a/examples/poll.rs +++ b/examples/poll.rs @@ -27,7 +27,9 @@ async fn main() { if op.did == "did:plc:hdhoaan3xa3jiuq4fg4mefid" { println!( "Update found for {}! cid={}\n -> operation: {}", - op.did, op.cid, op.operation.get() + op.did, + op.cid, + op.operation.get() ); } } diff --git a/src/poll.rs b/src/poll.rs index 0c2c74b..c4fc76f 100644 --- a/src/poll.rs +++ b/src/poll.rs @@ -175,22 +175,13 @@ pub async fn get_page(url: Url) -> Result<(ExportPage, Option), GetPageE /// # async fn main() { /// use allegedly::{ExportPage, Op, poll_upstream}; /// -/// // set to `None` to replay from the beginning of the PLC history /// let after = Some(chrono::Utc::now()); -/// -/// // the PLC server to poll for new ops /// let upstream = "https://plc.wtf/export".parse().unwrap(); -/// -/// // self-rate-limit (plc.directory's limit interval is 600ms) /// let throttle = std::time::Duration::from_millis(300); /// -/// // pages are sent out of the poller via a tokio mpsc channel /// let (tx, mut rx) = tokio::sync::mpsc::channel(1); -/// -/// // spawn a tokio task to run the poller /// tokio::task::spawn(poll_upstream(after, upstream, throttle, tx)); /// -/// // receive pages of plc ops from the poller /// while let Some(ExportPage { ops }) = rx.recv().await { /// println!("received {} plc ops", ops.len()); ///