mirror of
https://github.com/FuelLabs/sway.git
synced 2025-08-04 10:49:41 +00:00
Issue#3044 Update minor mistakes in README.md and src/reentrancy.sw (#3045)
Closes #3044
This commit is contained in:
parent
61236752c1
commit
a1d40f5888
2 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ The Sway Standard Library is the foundation of portable Sway software, a set of
|
|||
|
||||
## Usage
|
||||
|
||||
The standard library is made implicitly available to all Forc projects created using `forc new`. In other words, it is not required to manually specify `std` as an explicit dependency. Forc will automagically use the version of `std` that matches its version.
|
||||
The standard library is made implicitly available to all Forc projects created using `forc new`. In other words, it is not required to manually specify `std` as an explicit dependency. Forc will automatically use the version of `std` that matches its version.
|
||||
|
||||
Importing items from the standard library can be done using the `use` keyword, just as importing items from any other Sway library. For example:
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! A reentrancy check for use in Sway contracts.
|
||||
//! Note that this only works in internal contexts.
|
||||
//! to prevent reentrancy: `assert(!is_reentrant);
|
||||
//! to prevent reentrancy: `assert(!is_reentrant());`
|
||||
library reentrancy;
|
||||
|
||||
use ::assert::assert;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue