[err] Error names

This commit is contained in:
2024-02-17 11:22:26 +05:30
parent 1aecdacfde
commit 562a33cdc2
4 changed files with 9 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ impl Color {
}
pub fn try_new(in_mem_color: u8) -> EmulatorResult<Color> {
if in_mem_color > Self::COLOR_MAX {
return Err(EmulatorError::InvalidColorError(in_mem_color))
return Err(EmulatorError::InvalidColor(in_mem_color))
}
Ok(Color(in_mem_color))
}