Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Commit 5d612e9

Browse files
authored
Merge pull request #6 from ProgSoc/matrix-fix
fix(matrix): empty words
2 parents ce4ae80 + 7424421 commit 5d612e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

competition/matrix/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ fn random_matrix_and_words<R: Rng>(rng: &mut R) -> (Matrix, Vec<String>) {
3737
let word_list: BTreeSet<String> = lipsum_words(3 * MATRIX_DIM)
3838
.split_whitespace()
3939
.map(|s| s.chars().filter(|c| c.is_alphabetic()).collect::<String>())
40+
.filter(|s| !s.is_empty())
4041
.collect();
4142
let mut matrix = [[' '; MATRIX_DIM]; MATRIX_DIM];
4243
for offset_index in 0..MATRIX_DIM {

0 commit comments

Comments
 (0)