FuelLabs / FuelLabs/sway

Show an example in the Sway Book where a `match` arm is a `const`

Open
#3,301 0 comments 0 reactions 0 assignees View on GitHub
The Sway Book
Dominant language
Rust
Stars
61.4k
Forks
5.4k
Avg merge
3h 33m
Merged PRs (30d)
4

Description

This is a new feature that would nice showcase in the book. Example:
```rust
const A:u64 = 0;
const B:u64 = 1;
...
match value {
A => { .. },
B => { .. },
_ => { .. },
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the Sway Book and find the section covering match expressions or constants. Add a book example showing const names used as match arms, based on the issue's snippet, and verify that the documentation builds and the example renders correctly.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.