Skip to content

Commit

Permalink
Update description
Browse files Browse the repository at this point in the history
  • Loading branch information
bitfriend committed Dec 13, 2024
1 parent 65f1e30 commit 0c79d2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions native/acter/src/api/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ impl DeviceController {
}

impl Client {
// this return value should be Unpin, because next() of this stream is called in interactive_verification_started_from_request
// this return value should be wrapped in Box::pin, to make unpin possible
pub fn device_event_rx(&self) -> impl Stream<Item = DeviceEvent> + Unpin {
let mut stream = BroadcastStream::new(self.device_controller.event_rx.resubscribe());
Box::pin(stream.filter_map(|o| async move { o.ok() }))

Check warning on line 113 in native/acter/src/api/device.rs

View check run for this annotation

Codecov / codecov/patch

native/acter/src/api/device.rs#L111-L113

Added lines #L111 - L113 were not covered by tests
Expand Down
2 changes: 1 addition & 1 deletion native/acter/src/api/verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ impl SessionManager {
}

impl Client {
// this return value should be unpinned when wait_for_verification_event ends, because it calls pin_mut
// this return value should be Unpin, because next() of this stream is called in wait_for_verification_event
// this return value should be wrapped in Box::pin, to make unpin possible
pub fn verification_event_rx(&self) -> impl Stream<Item = VerificationEvent> + Unpin {
let mut stream = BroadcastStream::new(self.verification_controller.event_rx.resubscribe());
Expand Down

0 comments on commit 0c79d2f

Please sign in to comment.