mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
docs: replace remaining var
with mut
This commit is contained in:
parent
4f4567513e
commit
7bcca827b6
@ -562,12 +562,12 @@ Their access modifiers can be changed with
|
||||
```v
|
||||
struct Foo {
|
||||
a int // private immutable (default)
|
||||
var:
|
||||
mut:
|
||||
b int // private mutable
|
||||
c int // (you can list multiple fields with the same access modifier)
|
||||
pub:
|
||||
d int // public immmutable (readonly)
|
||||
pub var:
|
||||
pub mut:
|
||||
e int // public, but mutable only in parent module
|
||||
__global:
|
||||
f int // public and mutable both inside and outside parent module
|
||||
@ -637,7 +637,7 @@ It is possible to modify function arguments by using the same keyword `mut`:
|
||||
|
||||
```v
|
||||
struct User {
|
||||
var:
|
||||
mut:
|
||||
is_registered bool
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user