You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function docs willow-rs uses imperative ("Create a new path") whereas the rust conventions use third person ("Creates a new path")
A few methods are prefixed with get_, which is discouraged in the conventions. So Path::component_count instead of Path::get_component_count
If there aren't strong reasons for deviating from the convention, I found it to be quite helpful in my coding experience to just stick with it for general consistency and bikeshed avoidance.
The text was updated successfully, but these errors were encountered:
Those are on me, I think. I didn't know about those conventions, and these are how I do them usually (exactly for general consistency =D). But I personally am happy to defer to the wider conventions of the rust ecosystem on these points.
sgwilym
changed the title
Naming conventions for functions and docs
Remove .get fn names, use third-person in docs
Sep 6, 2024
Hi,
while starting to work with willow-rs I noted some things where the codebase differs from the rust naming conventions and documentation conventions:
willow-rs
uses imperative ("Create a new path") whereas the rust conventions use third person ("Creates a new path")get_
, which is discouraged in the conventions. SoPath::component_count
instead ofPath::get_component_count
If there aren't strong reasons for deviating from the convention, I found it to be quite helpful in my coding experience to just stick with it for general consistency and bikeshed avoidance.
The text was updated successfully, but these errors were encountered: