docs: replace remaining `var` with `mut`
parent
4f4567513e
commit
7bcca827b6
|
@ -562,12 +562,12 @@ Their access modifiers can be changed with
|
||||||
```v
|
```v
|
||||||
struct Foo {
|
struct Foo {
|
||||||
a int // private immutable (default)
|
a int // private immutable (default)
|
||||||
var:
|
mut:
|
||||||
b int // private mutable
|
b int // private mutable
|
||||||
c int // (you can list multiple fields with the same access modifier)
|
c int // (you can list multiple fields with the same access modifier)
|
||||||
pub:
|
pub:
|
||||||
d int // public immmutable (readonly)
|
d int // public immmutable (readonly)
|
||||||
pub var:
|
pub mut:
|
||||||
e int // public, but mutable only in parent module
|
e int // public, but mutable only in parent module
|
||||||
__global:
|
__global:
|
||||||
f int // public and mutable both inside and outside parent module
|
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
|
```v
|
||||||
struct User {
|
struct User {
|
||||||
var:
|
mut:
|
||||||
is_registered bool
|
is_registered bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue