docs: bookmarked: add comments to Bookmarked functions#164
Open
JGBSouza wants to merge 1 commit intokworkflow:unstablefrom
Open
docs: bookmarked: add comments to Bookmarked functions#164JGBSouza wants to merge 1 commit intokworkflow:unstablefrom
JGBSouza wants to merge 1 commit intokworkflow:unstablefrom
Conversation
Collaborator
There was a problem hiding this comment.
Hey @JGBSouza, thanks for the contribution.
- I'm not sure we need to describe implementation details in the docstrings, specially for simple functions, which are fair easy to understand by looking at the implementation. So I would prefer if the function comments were more objective regarding the function purpose.
Instead of "Add a patchset to the list of bookmarks. The patchset is only added if it is not already on the list.", you could simply say "Add a patchset to the list of bookmarks if it's not bookmarked". The functions are simple, so the docstring should be proportional to that. - Let me know if the "copy" comment makes sense, since it's specific because of Rust details it could be a little counterintuitive.
- Regarding the commit message, it's the same thing as the previous PR. We just need 1 prefix, specially for contributions that are relatively simple
src/app/screens/bookmarked.rs
Outdated
Comment on lines
29
to
31
| /// Get the patchset that is selected now | ||
| /// | ||
| /// Returns a copy of the selected patchset |
Collaborator
There was a problem hiding this comment.
In Rust, "copy" probably has a different meaning compared to other languages. I understood what you meant, but it's not super precise in terms of Rust. Since you're clining the Patch, you're not returning a copy of it, but a clone, a.k.a deep copy, which duplicates the Patch in memory
0fc3f30 to
8ef271e
Compare
This pr add simple comments in the Bookmarked functions improving its documentation. Signed-off-by: JGBSouza <joaosouzaaa12@usp.br>
8ef271e to
b4cb039
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr add simple comments in the Bookmarked functions improving its documentation.