Skip to content

Commit

Permalink
chore: fix some comments (#271)
Browse files Browse the repository at this point in the history
## Type of change


- Documentation


## Changes



-  fix some comments


## Notes

- Note 1

## Related Issues

<!--Delete everything after the "#" symbol and replace it with a number.
No spaces between hash and number-->

Closes #\<issue number\>

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
- [ ] I have updated the changelog to reflect the changes on this PR.

Signed-off-by: withbest <[email protected]>
Co-authored-by: Cameron Carstens <[email protected]>
  • Loading branch information
withbest and bitzoic authored Aug 15, 2024
1 parent 50be622 commit 847c0d3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/contributing-book/src/code_docs/naming-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Using a single character to name a variable conveys little to no information to

- Is this a throw away variable?
- What is the variable meant to represent where ever it is used?
- Does it make sense to call it by the chosen character e.g. `x` when referring to forumlas?
- Does it make sense to call it by the chosen character e.g. `x` when referring to formulas?

### Ambigious Abbreviations
### Ambiguous Abbreviations

A common mistake is to abbreviate a variable when it does not need to be abbreviated or when the abbreviation may be ambigious.
A common mistake is to abbreviate a variable when it does not need to be abbreviated or when the abbreviation may be ambiguous.

For example, in the context of an industry that deals with temperature sensors what does the variable `temp` refer to?

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing-book/src/pull-requests/creating-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If there is an issue that the pull request is working off of then it's a good pr

For example, issue number `123` would be referenced in the description as `closes #123`.

Additionally, referencing the issue that the pull request is based on allows the reviewer to easily click on the link which will take them to the issue. This makes it easy to see the problem in detail and any discussion that occured.
Additionally, referencing the issue that the pull request is based on allows the reviewer to easily click on the link which will take them to the issue. This makes it easy to see the problem in detail and any discussion that occurred.

### Merging the Pull Request

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing-book/src/pull-requests/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pull Requests

A pull request is a term used to identify when a piece of work is ready to be pulled into and merged with another piece of work. This funtionality is especially useful when collaborating with others because it allows a review process to take place.
A pull request is a term used to identify when a piece of work is ready to be pulled into and merged with another piece of work. This functionality is especially useful when collaborating with others because it allows a review process to take place.

In order to create a high quality pull request there are a couple areas that need to be considered:

Expand Down
4 changes: 2 additions & 2 deletions libs/src/reentrancy.sw
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn reentrancy_guard() {
///
/// # Returns
///
/// * [bool] - `true` if reentrancy pattern has occured.
/// * [bool] - `true` if reentrancy pattern has occurred.
///
/// # Examples
///
Expand All @@ -58,7 +58,7 @@ pub fn is_reentrant() -> bool {
let this_id = ContractId::this();

// Reentrancy cannot occur in an external context. If not detected by the time we get to the
// bottom of the call_frame stack, then no reentrancy has occured.
// bottom of the call_frame stack, then no reentrancy has occurred.
let mut call_frame_pointer = frame_ptr();
if !call_frame_pointer.is_null() {
call_frame_pointer = get_previous_frame_pointer(call_frame_pointer);
Expand Down
2 changes: 1 addition & 1 deletion libs/src/signed_integers/errors.sw
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ library;

/// Error log for when unexpected behavior has occurred.
pub enum Error {
/// Emitted when division by zero has occured.
/// Emitted when division by zero has occurred.
ZeroDivisor: (),
}

0 comments on commit 847c0d3

Please sign in to comment.