dapr / dapr/rust-sdk

Misleading comment in the Invoke example

Open
#93 3 comments 0 reactions 0 assignees View on GitHub
documentation P2 pinned
Dominant language
Rust
Stars
252
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Looks like it was copy/pasted from the [pubsub](https://github.com/dapr/rust-sdk/blob/b69e1f84b04858f72de4c70793cc353fcbf08529/examples/pubsub/subscriber.rs#L25) example.

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

https://github.com/dapr/rust-sdk/blob/b69e1f84b04858f72de4c70793cc353fcbf08529/examples/invoke/grpc/server.rs#L55-L66

Perhaps it should read something like:

```rs
/// 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?

Contributor guide

Open the contributing guide

Research direction

Start with examples/invoke/grpc/server.rs at lines 55-66 and compare the referenced pubsub/subscriber.rs comment. Then inspect the relevant trait methods to determine whether the issue is limited to correcting the misleading documentation or also requires deciding how default behaviors should be provided; done means the comment and any resulting trait behavior match the project’s decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.