We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Add naming convention to code style guide (inside docs/contributing_guides/style_guide.md).
docs/contributing_guides/style_guide.md
If value of type Option<T>, then prepend the variable name with maybe_..., since the value can be None or Some.
Option<T>
maybe_...
None
Some
For example:
let maybe_selected_branches: Option<Vec<String>> = ask_user_to_select_from_list( branches, ask_to_select_branches_header, SelectionMode::Multiple, ); match maybe_selected_branches { Some(branches) => {...}, None => {} }
If value is of type is Result<T>, then prepend the variable name with result_..., since the value can be Err or Ok.
Result<T>
result_...
Err
Ok
let result_json_data: Result<String, Box<dyn Err>> = perform_fetch_call(...); match result_json_data { Ok(json_data) => {...}, Err(error) => {...} }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add naming convention to code style guide (inside
docs/contributing_guides/style_guide.md
).Option
If value of type
Option<T>
, then prepend the variable name withmaybe_...
, since the value can beNone
orSome
.For example:
Result
If value is of type is
Result<T>
, then prepend the variable name withresult_...
, since the value can beErr
orOk
.For example:
The text was updated successfully, but these errors were encountered: