Skip to content

Commit

Permalink
Update library inline docs descriptions (#5984)
Browse files Browse the repository at this point in the history
## Description

While reviewing the [std-lib
docs](https://fuellabs.github.io/sway/master/std/), it was noted that
some of the libraries and modules do not have docs or are outdated.
These have been updated.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [x] 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.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] 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).
- [x] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: K1-R1 <77465250+K1-R1@users.noreply.github.com>
  • Loading branch information
bitzoic and K1-R1 committed May 10, 2024
1 parent fc4007d commit 76a6cd3
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sway-lib-std/src/address.sw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! A wrapper around the `b256` type to help enhance type-safety.
//! The `Address` type used for interacting with addresses on the fuel network.
library;

use ::convert::From;
Expand Down
1 change: 1 addition & 0 deletions sway-lib-std/src/alias.sw
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Aliases for various types in Sway.
library;

/// The `SubId` type is simply an alias for `b256` that represents the sub identifier of a native asset.
Expand Down
1 change: 1 addition & 0 deletions sway-lib-std/src/asset_id.sw
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! The `AssetId` type used for interacting with an asset on the fuel network.
library;

use ::alias::SubId;
Expand Down
3 changes: 1 addition & 2 deletions sway-lib-std/src/b512.sw
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! A wrapper around two `b256` types to support the usage of 64-byte values in Sway,
//! which are needed when working with public keys and signatures.
//! The `B512` type supports the usage of 64-byte values in Sway which are needed when working with public keys and signatures.
library;

use ::constants::ZERO_B256;
Expand Down
2 changes: 1 addition & 1 deletion sway-lib-std/src/constants.sw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Base asset and zero address constants.
//! Definitions for constant values in Sway.
library;

/// A b256 of zero value.
Expand Down
2 changes: 1 addition & 1 deletion sway-lib-std/src/contract_id.sw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! A wrapper around the `b256` type to help enhance type-safety.
//! The `ContractId` type used for interacting with contracts on the fuel network.
library;

use ::convert::From;
Expand Down
1 change: 1 addition & 0 deletions sway-lib-std/src/execution.sw
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Helper functions to load and run external contract code.
library;

use ::contract_id::ContractId;
Expand Down
1 change: 1 addition & 0 deletions sway-lib-std/src/iterator.sw
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! The iterator trait to iterate over elements.
library;

use ::option::Option::{self, *};
Expand Down
1 change: 1 addition & 0 deletions sway-lib-std/src/string.sw
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! A UTF-8 encoded growable string.
library;

use ::assert::assert;
Expand Down

0 comments on commit 76a6cd3

Please sign in to comment.