Implement unwrapping method
This commit is contained in:
parent
af44f3e4d2
commit
99f08b418d
2 changed files with 9 additions and 0 deletions
|
|
@ -65,6 +65,8 @@ fn main() {
|
|||
// Any `Valid<Username>` passed is guaranteed
|
||||
// to have met the arbitrary validation checks.
|
||||
fn create_account(username: Valid<Username>) {
|
||||
let username = username.into_inner(); // Unwrap
|
||||
|
||||
println!("Account {:?} created", username);
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue