mirror of
https://github.com/Xevion/banner.git
synced 2025-12-15 12:11:11 -06:00
chore: solve lints, improve formatting
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user