@@ -296,13 +296,13 @@ where
296296#[ cfg( feature = "pem" ) ]
297297#[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
298298pub enum PemParseError {
299- ///Indicates invalid PEM string
299+ /// Indicates invalid PEM string
300300 Pem ( pem_rfc7468:: Error ) ,
301- ///Indicates invalid pkcs8 EC key
301+ /// Indicates invalid PKCS#8 EC key
302302 Pkcs8 ( :: pkcs8:: Error ) ,
303- ///Indicates invalid Sec1 EC key
303+ /// Indicates invalid SEC1 EC key
304304 Sec1 ( :: sec1:: Error ) ,
305- ///Unable to recognize document label
305+ /// Unable to recognize document label
306306 UnknownLabel ,
307307}
308308
@@ -336,8 +336,10 @@ impl fmt::Display for PemParseError {
336336 match self {
337337 Self :: Pem ( error) => fmt. write_fmt ( format_args ! ( "Failed to parse PEM: {error}" ) ) ,
338338 Self :: UnknownLabel => fmt. write_str ( "Unrecognized key label" ) ,
339- Self :: Pkcs8 ( error) => fmt. write_fmt ( format_args ! ( "Faoled to parse Pkcs8 key: {error}" ) ) ,
340- Self :: Sec1 ( error) => fmt. write_fmt ( format_args ! ( "Faoled to parse SEC1 key: {error}" ) ) ,
339+ Self :: Pkcs8 ( error) => {
340+ fmt. write_fmt ( format_args ! ( "Failed to parse PKCS#8 key: {error}" ) )
341+ }
342+ Self :: Sec1 ( error) => fmt. write_fmt ( format_args ! ( "Failed to parse SEC1 key: {error}" ) ) ,
341343 }
342344 }
343345}
@@ -355,7 +357,7 @@ where
355357 ///
356358 /// Supported formats:
357359 /// - `SEC1` - requires feature `sec1`
358- /// - `PKCS #8` - requires feature `pkcs8`
360+ /// - `PKCS#8` - requires feature `pkcs8`
359361 ///
360362 /// # Errors
361363 /// - If `pem` is not valid PEM encoded private key
0 commit comments