chore: solve lints, improve formatting

This commit is contained in:
2025-08-27 12:19:17 -05:00
parent ac70306c04
commit cb8a595326
9 changed files with 103 additions and 130 deletions

View File

@@ -103,7 +103,7 @@ fn parse_course_code(input: &str) -> Result<(i32, i32), Error> {
// Handle single course code
if input.len() == 4 {
let code: i32 = input.parse()?;
if code < 1000 || code > 9999 {
if !(1000..=9999).contains(&code) {
return Err("Course codes must be between 1000 and 9999".into());
}
return Ok((code, code));