@@ -41,7 +41,7 @@ pub enum Error {
4141 // Validation error.
4242 Validate ( & ' static str ) ,
4343 // Bad hex string error.
44- Hexidecimal ( & ' static str ) ,
44+ Hexadecimal ( & ' static str ) ,
4545 // IO error reading file.
4646 Io ( io:: Error ) ,
4747 // Deserialization error.
@@ -55,7 +55,7 @@ impl std::error::Error for Error {
5555 match self {
5656 Error :: NotFound => None ,
5757 Error :: Validate ( _) => None ,
58- Error :: Hexidecimal ( _) => None ,
58+ Error :: Hexadecimal ( _) => None ,
5959 Error :: Io ( err) => err. source ( ) ,
6060 Error :: Ron ( err) => err. source ( ) ,
6161 Error :: Watch ( err) => err. source ( ) ,
@@ -68,8 +68,8 @@ impl Display for Error {
6868 match self {
6969 Error :: NotFound => write ! ( f, "No config found" ) ,
7070 Error :: Validate ( problem) => write ! ( f, "Error validating config file: {}" , problem) ,
71- Error :: Hexidecimal ( problem) => {
72- write ! ( f, "Error parsing hexidecimal string: {}" , problem)
71+ Error :: Hexadecimal ( problem) => {
72+ write ! ( f, "Error parsing hexadecimal string: {}" , problem)
7373 }
7474 Error :: Io ( err) => write ! ( f, "Error reading config file: {}" , err) ,
7575 Error :: Ron ( err) => write ! ( f, "Problem with config file: {}" , err) ,
@@ -272,7 +272,7 @@ impl Config {
272272 }
273273 }
274274
275- // Get mutable refernce to global config variable.
275+ // Get mutable reference to global config variable.
276276 pub fn get_mut ( ) -> & ' static mut Config {
277277 unsafe {
278278 assert ! ( CONFIG . is_some( ) ) ;
@@ -592,7 +592,7 @@ impl Color {
592592 let dec = u32:: from_str_radix ( sanitized, 16 ) ;
593593 let dec = match dec {
594594 Ok ( d) => d,
595- Err ( _) => return Err ( Error :: Hexidecimal ( "Invalid hexidecimal string." ) ) ,
595+ Err ( _) => return Err ( Error :: Hexadecimal ( "Invalid hexadecimal string." ) ) ,
596596 } ;
597597
598598 // If we have 8 chars, then this is hex string includes alpha, if we have 6, then it
@@ -611,7 +611,7 @@ impl Color {
611611 let b = ( dec & 0xff ) as f64 / 255.0 ;
612612 Ok ( Color :: from_rgba ( r, g, b, a) )
613613 } else {
614- Err ( Error :: Hexidecimal ( "Incorrect hexidecimal string length." ) )
614+ Err ( Error :: Hexadecimal ( "Incorrect hexadecimal string length." ) )
615615 }
616616 }
617617}
@@ -648,7 +648,7 @@ impl<'de> Deserialize<'de> for Color {
648648 #[ allow( clippy:: or_fun_call) ]
649649 return Color :: from_hex ( & hex) . or ( Err ( de:: Error :: invalid_value (
650650 Unexpected :: Str ( & hex) ,
651- & "a valid hexidecimal string" ,
651+ & "a valid hexadecimal string" ,
652652 ) ) ) ;
653653 } else if let ( Some ( r) , Some ( g) , Some ( b) , Some ( a) ) = ( col. r , col. g , col. b , col. a ) {
654654 Ok ( Color :: from_rgba ( r, g, b, a) )
0 commit comments