Skip to content

Commit 0a9f4e8

Browse files
committed
run v fmt -w . with latest V
1 parent d5eef4b commit 0a9f4e8

19 files changed

+61
-61
lines changed

2020/02/rolfschmidt.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ fn (p D2Password) valid_by_index() bool {
2727
fn d2_parse_password(password string) D2Password {
2828
groups := regex_match(password, r'(\d+)-(\d+)\s(\w+):\s(\w+)')
2929
return D2Password{
30-
min_char: groups[1].int()
31-
max_char: groups[2].int()
32-
check_char: groups[3]
30+
min_char: groups[1].int()
31+
max_char: groups[2].int()
32+
check_char: groups[3]
3333
check_string: groups[4]
3434
}
3535
}

2020/03/rolfschmidt.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn (mut p D3Map) tree_count(addx int, addy int) u64 {
4040

4141
fn d3_parse_map(day_map []string) D3Map {
4242
return D3Map{
43-
map: day_map
43+
map: day_map
4444
posx: 0
4545
posy: 0
4646
}

2020/07/rolfschmidt.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn d7_parse_shiny_bags(bag_data string) []D7Bag {
5353
}
5454
name := inner_bag.replace(' bags', '').replace(' bag', '')[2..]
5555
inner_bags << D7Bag{
56-
name: name
56+
name: name
5757
count: inner_bag[0..2].int()
5858
}
5959
}

2020/20/rolfschmidt.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn (tile Tile) clone() Tile {
2525
fn (tile Tile) flip() Tile {
2626
return Tile{
2727
number: tile.number
28-
data: tile.data.map(it.clone().reverse())
28+
data: tile.data.map(it.clone().reverse())
2929
}
3030
}
3131

@@ -137,7 +137,7 @@ fn d20_run(part2 bool) u64 {
137137
image := block.all_after(':\n').split('\n').map(it.split(''))
138138
tile := Tile{
139139
number: tn
140-
data: image
140+
data: image
141141
}
142142
if i == 0 {
143143
add_result(mut rm, 0, 0, tile)

2022/07/ChAoSUnItY.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ mut:
1010
fn new_fs() FileSystem {
1111
return FileSystem{
1212
current_node: 0
13-
nodes: [DirNode{
14-
name: '/'
13+
nodes: [DirNode{
14+
name: '/'
1515
parent: none
1616
}]
1717
}

2022/07/hillerstorm.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212

1313
mut directories := {
1414
'/': Directory{
15-
name: '/'
15+
name: '/'
1616
parent: ''
1717
}
1818
}
@@ -82,7 +82,7 @@ fn main() {
8282

8383
fn add_directory(mut directories map[string]Directory, mut sub_directories map[string][]string, parent &Directory, name string) Directory {
8484
dir := Directory{
85-
name: name
85+
name: name
8686
parent: parent.name
8787
}
8888
directories[name] = dir

2022/08/mvlootman.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ fn new_grid(lines []string) Grid {
2626

2727
return Grid{
2828
height: lines.len
29-
width: lines[0].len
30-
grid: grid
29+
width: lines[0].len
30+
grid: grid
3131
}
3232
}
3333

2022/09/ChAoSUnItY.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn process_data(data string) []Instruction {
9999
line_segment := line.split(' ')
100100
return Instruction{
101101
direction: line_segment[0][0]
102-
steps: line_segment[1].int()
102+
steps: line_segment[1].int()
103103
}
104104
})
105105
}

2022/10/mvlootman.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ fn parse(line string) Instruction {
4242

4343
return Instruction{
4444
kind: parts[0]
45-
val: val
45+
val: val
4646
}
4747
}

2022/11/hillerstorm.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ fn parse_monkeys(input []string) ([]Monkey, int) {
8181
product *= div_by
8282

8383
monkeys[i] = Monkey{
84-
items: num_regex.find_all_str(lines[1]).map(it.i64())
85-
operation: &operation
86-
div_by: div_by
87-
monkey_if_true: num_regex.find_all_str(lines[4]).first().int()
84+
items: num_regex.find_all_str(lines[1]).map(it.i64())
85+
operation: &operation
86+
div_by: div_by
87+
monkey_if_true: num_regex.find_all_str(lines[4]).first().int()
8888
monkey_if_false: num_regex.find_all_str(lines[5]).first().int()
8989
}
9090
}

0 commit comments

Comments
 (0)