Skip to content

Misleading comment in the Invoke example #93

Open
@NickLarsenNZ

Description

@NickLarsenNZ

Looks like it was copy/pasted from the pubsub example.

Topic A Is not returned here, only the default (which is an empty list, given Vec is Default over T):

/// Lists all topics subscribed by this app.
///
/// NOTE: Dapr runtime will call this method to get
/// the list of topics the app wants to subscribe to.
/// In this example, the app is subscribing to topic `A`.
async fn list_topic_subscriptions(
&self,
_request: Request<()>,
) -> Result<Response<ListTopicSubscriptionsResponse>, Status> {
let list_subscriptions = ListTopicSubscriptionsResponse::default();
Ok(Response::new(list_subscriptions))
}

Perhaps it should read something like:

/// Return an empty list of topics. 

... but on that note, should the trait methods provide these default behaviours so we don't have to implement defaults for each unused method?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2documentationImprovements or additions to documentationpinneddapr-bot exemption

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions