Skip to content

Commit 04c9518

Browse files
committed
Fix USubscription doc tests
The doc tests had not been updated yet to reflect the changes introduced to the UTransport trait's functions for matching on source and sink address patterns.
1 parent fc71ce2 commit 04c9518

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/core/usubscription.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ use async_trait::async_trait;
4949
/// # todo!()
5050
/// # }
5151
/// #
52-
/// # async fn receive(&self, topic: UUri) -> Result<UMessage, UStatus> {
52+
/// # async fn receive(&self, source_filter: &UUri, sink_filter: Option<&UUri>) -> Result<UMessage, UStatus> {
5353
/// # todo!()
5454
/// # }
5555
/// #
56-
/// # async fn register_listener(&self, topic: UUri, listener: Arc<dyn UListener>) -> Result<(), UStatus> {
56+
/// # async fn register_listener(&self, source_filter: &UUri, sink_filter: Option<&UUri>, listener: Arc<dyn UListener>) -> Result<(), UStatus> {
5757
/// # Ok(())
5858
/// # }
5959
/// #
60-
/// # async fn unregister_listener(&self, topic: UUri, listener: Arc<dyn UListener>) -> Result<(), UStatus> {
60+
/// # async fn unregister_listener(&self, source_filter: &UUri, sink_filter: Option<&UUri>, listener: Arc<dyn UListener>) -> Result<(), UStatus> {
6161
/// # Ok(())
6262
/// # }
6363
/// # }
@@ -213,7 +213,7 @@ use async_trait::async_trait;
213213
/// let subscription_response = usub.subscribe(subscription_request).await?;
214214
/// let success_code = subscription_response.status.code.enum_value_or(UCode::UNKNOWN);
215215
/// if success_code == UCode::OK {
216-
/// let register_success = up_client.register_listener(door_uuri.clone(), my_listener.clone()).await;
216+
/// let register_success = up_client.register_listener(&door_uuri, None, my_listener.clone()).await;
217217
/// } else {
218218
/// match success_code {
219219
/// UCode::NOT_FOUND => { /* handle topic not found */ }
@@ -227,7 +227,7 @@ use async_trait::async_trait;
227227
/// ..Default::default()
228228
/// };
229229
/// let unsubscribe_result = usub.unsubscribe(unsubscribe_request).await?;
230-
/// let unregister_success = up_client.register_listener(door_uuri.clone(), my_listener.clone()).await;
230+
/// let unregister_success = up_client.register_listener(&door_uuri, None, my_listener.clone()).await;
231231
/// #
232232
/// # Ok(())
233233
/// # }

0 commit comments

Comments
 (0)