-
Notifications
You must be signed in to change notification settings - Fork 3
feat: added Topic::child method that returns a child topic #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
That sounds like a valid use-case, though the code doesn't seem to do what you described? What I interpret a Topic topic = client.topic("/mytopic"); // `/mytopic`
Topic child = topic.child("/suffix"); // `/mytopic/suffix`But the current implementation that you have only returns a topic with the same name as the argument in |
|
Also, just a nitpick but I recently switched to using conventional commits as a convention for commit messages, so it would be nice to change that one commit message to follow that convention. Something like |
|
I just realized that I didn't combine the strings 🤦. My bad. |
|
I just fixed the issue. Apologies for the error, and thanks for catching it. |
|
Alright looks good now, just a couple things before I merge:
|
|
Thanks for the feedback on the function, as I stated earlier, I'm nowhere near the greatest rust programmer. I assume you're fixing those before merging (with the likely exception of the documentation since that is not crucial)? |
|
I don't have permission to as the pr is merging from your own repo that I don't have write access to. |
|
Ok, I will fix that when I get home and probably write some documentation on what it is for/how to use it. |
Working with this, I needed to access multiple different topics from the same prefix. While I could have simply used a string for my prefix (which is what I am doing now), I figured it would be more intuitive to add a function that returns a "child" topic. Feel free to change anything about this; I am definitely not the best Rust programmer.