Skip to content

Commit 5e45116

Browse files
Fix ZERO_B256 docs (#5835)
## Description The example wont compile as the function returns a assetid instead of b256, the proposed changes fixes it so the example should compile now. ## 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. Co-authored-by: IGI-111 <igi-111@protonmail.com>
1 parent 53fdb8d commit 5e45116

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sway-lib-std/src/constants.sw

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ use ::asset_id::AssetId;
2020
/// ```
2121
pub const BASE_ASSET_ID: AssetId = AssetId::from(ZERO_B256);
2222

23-
/// A B256 of zero value.
23+
/// A b256 of zero value.
2424
///
2525
/// # Examples
2626
///
2727
/// ```sway
2828
/// use std::{call_frames::msg_asset_id, constants::ZERO_B256};
2929
///
3030
/// fn foo() {
31-
/// assert(ZERO_B256 == msg_asset_id());
31+
/// assert(ZERO_B256 == msg_asset_id().bits());
3232
/// }
3333
/// ```
3434
pub const ZERO_B256 = 0x0000000000000000000000000000000000000000000000000000000000000000;

0 commit comments

Comments
 (0)