mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-01 07:53:30 +02:00
Use a Vec for the name col padding
This commit is contained in:
+3
-1
@@ -14,9 +14,11 @@ use crate::{
|
||||
collections::{hash_set_with_capacity, HashSet},
|
||||
exercise::{RunnableExercise, OUTPUT_CAPACITY},
|
||||
info_file::{ExerciseInfo, InfoFile},
|
||||
CURRENT_FORMAT_VERSION, MAX_EXERCISE_NAME_LEN,
|
||||
CURRENT_FORMAT_VERSION,
|
||||
};
|
||||
|
||||
const MAX_EXERCISE_NAME_LEN: usize = 32;
|
||||
|
||||
// Find a char that isn't allowed in the exercise's `name` or `dir`.
|
||||
fn forbidden_char(input: &str) -> Option<char> {
|
||||
input.chars().find(|c| !c.is_alphanumeric() && *c != '_')
|
||||
|
||||
Reference in New Issue
Block a user