Skip to content

Commit 2d02cfd

Browse files
committed
fix
1 parent 4a321c1 commit 2d02cfd

File tree

12 files changed

+71
-11
lines changed

12 files changed

+71
-11
lines changed

build.zip

584 KB
Binary file not shown.

lead_init/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn main() {
99
let mut home = home_dir().unwrap();
1010
home.push("leadLang");
1111

12-
let folder = Text::new(&"Where shall we install lead?")
12+
let _ = Text::new(&"Where shall we install lead?")
1313
.with_default(&home.to_str().unwrap())
1414
.prompt()
1515
.unwrap();

packages/core/docs/2/1.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
- **From:** 📦 Core / Array
33

44
## Description
5-
""
5+
Allocate an array in memory
6+
## Format:
7+
```
8+
$var: array::alloc
9+
```
10+

packages/core/docs/2/2.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,16 @@
22
- **From:** 📦 Core / Array
33

44
## Description
5-
""
5+
Push a value to an array
6+
## Format:
7+
```
8+
array::push ->&$array ->$val
9+
```
10+
11+
## Example:
12+
```
13+
$var: array::malloc
14+
$to_push: malloc string Hello
15+
16+
array::push ->&$var ->$to_push
17+
```

packages/core/docs/2/3.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22
- **From:** 📦 Core / Array
33

44
## Description
5-
""
5+
Push if capacity available
6+
## Format:
7+
```
8+
array::push_if_cap_available ->&array ->$val
9+
```
10+
11+
⚠️ It may reject silent if size isn't within capacity, not recommended

packages/core/docs/2/4.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,12 @@
22
- **From:** 📦 Core / Array
33

44
## Description
5-
""
5+
Removes the last element from an array & returns it
6+
## Format:
7+
```
8+
# If you want to discard the result
9+
array::pop ->&$array
10+
11+
# If you want to collect it
12+
$var: array::pop ->&$array
13+
```

packages/core/docs/2/5.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
- **From:** 📦 Core / Array
33

44
## Description
5-
""
5+
Returns the length of the array
6+
## Format:
7+
```
8+
$len: array::len ->&$array
9+
```

packages/core/docs/2/6.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
# array::capacity
1+
# array::cap
22
- **From:** 📦 Core / Array
33

44
## Description
5-
""
5+
Returns the capacity of the array
6+
## Format:
7+
```
8+
$len: array::cap ->&$array
9+
```

packages/core/docs/2/7.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@
22
- **From:** 📦 Core / Array
33

44
## Description
5-
""
5+
Completely clears the array
6+
## Format:
7+
```
8+
array::clear ->&array
9+
```
10+
11+
## Note:
12+
It is advisable to drop() the array if you want to clear it from memory

packages/core/docs/2/8.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# array::get
2+
- **From:** 📦 Core / Array
3+
4+
## Description
5+
Gets a pointer reference to an element of an array
6+
## Format:
7+
```
8+
*val: array::get ->&array 1
9+
*val: array::get ->&array 32
10+
11+
-- OR --
12+
*val: array::get ->&array $index
13+
```

packages/core/docs/2/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# 📦 Core / Array
2-
- 7 &'static Methods
2+
- 8 &'static Methods
33
- 0 &'a dyn Methods

packages/core/docs/file

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ array::push->./docs/2/2
99
array::push_if_cap_available->./docs/2/3
1010
array::pop->./docs/2/4
1111
array::len->./docs/2/5
12-
array::capacity->./docs/2/6
12+
array::cap->./docs/2/6
1313
array::clear->./docs/2/7
14+
array::get->./docs/2/8
1415
str::to_int->./docs/3/1

0 commit comments

Comments
 (0)