Skip to content

Commit fc1ccd9

Browse files
committed
Run verusfmt
1 parent a558d4e commit fc1ccd9

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

tasks/human_eval_025.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ pub fn factorize(n: u8) -> (factorization: Vec<u8>)
355355
assert((k as int) == ((k as int) / (m as int)) * (m as int)) by {
356356
lemma_fundamental_div_mod(k as int, m as int)
357357
};
358-
proof {
358+
proof {
359359
// Prove that we're still making progress towards termination
360360
lemma_div_decreases(k as int, m as int);
361361
}

tasks/human_eval_062.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ fn derivative(xs: &Vec<u32>) -> (ret: Vec<u64>)
2828
invariant
2929
xs@.map(|i: int, x| i * x).subrange(1, i as int) =~= ret@.map_values(|x| x as int),
3030
1 <= i <= xs.len() <= u32::MAX,
31-
decreases
32-
xs.len() - i,
31+
decreases xs.len() - i,
3332
{
3433
proof {
3534
// Prove that the multiplication does not overflow

tasks/human_eval_087.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ pub open spec fn coords_matches_lst(
8989
proof fn coords_distinct_after_push(coords: Seq<(usize, usize)>, x: usize, y: usize)
9090
requires
9191
coords_distinct(coords),
92-
forall|k: int|
93-
0 <= k < coords.len() ==> #[trigger]
94-
coords[k].0 < x || coords[k].1 > y,
92+
forall|k: int| 0 <= k < coords.len() ==> #[trigger] coords[k].0 < x || coords[k].1 > y,
9593
ensures
9694
coords_distinct(coords.push((x, y))),
9795
{

tasks/human_eval_129.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,9 @@ pub fn min_path<const N: usize>(grid: [[u8; N]; N], k: u8) -> (path: Vec<u8>)
447447
j0: int,
448448
|
449449
({
450-
let m = path@.map_values(|j: u8| j as int)[i];
451-
let n = path@.map_values(|j: u8| j as int)[(i + 1)];
452-
#[trigger] grid[i0][j0] == m &&
453-
is_adjacent::<N>(grid, m, n, (i0, j0))
450+
let m = path@.map_values(|j: u8| j as int)[i];
451+
let n = path@.map_values(|j: u8| j as int)[(i + 1)];
452+
#[trigger] grid[i0][j0] == m && is_adjacent::<N>(grid, m, n, (i0, j0))
454453
})));
455454
}
456455
assert(forall|i: int|

tasks/human_eval_163.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ fn generate_integers(a: u32, b: u32) -> (result: Vec<u32>)
7373
if i % 2 == 0 {
7474
result.push(i);
7575
assert(result@.contains(i)) by {
76-
assert(result@[result@.len() - 1] == i); // trigger
76+
assert(result@[result@.len() - 1] == i); // trigger
7777
}
7878
assert forall|x: int|
79-
vmin(a as int, b as int) <= x < i && 2 <= x <= 8 && x % 2 == 0
80-
implies #[trigger] result@.contains(x as u32) by {
79+
vmin(a as int, b as int) <= x < i && 2 <= x <= 8 && x % 2
80+
== 0 implies #[trigger] result@.contains(x as u32) by {
8181
if x == i {
8282
} else {
8383
assert(old_result.contains(x as u32));
84-
let i = choose |i| 0 <= i < old_result.len() && old_result[i] == x as u32;
85-
assert(result@[i] == x as u32); // trigger
84+
let i = choose|i| 0 <= i < old_result.len() && old_result[i] == x as u32;
85+
assert(result@[i] == x as u32); // trigger
8686
assert(result@.contains(x as u32));
8787
}
8888
}

0 commit comments

Comments
 (0)