@@ -31,7 +31,7 @@ impl Error {
3131 pub const UNSUPPORTED : Error = internal_error ! ( 0 ) ;
3232 /// The platform-specific `errno` returned a non-positive value.
3333 pub const ERRNO_NOT_POSITIVE : Error = internal_error ! ( 1 ) ;
34- /// Invalid conversion from a non-standard [`std::io::Error`]
34+ /// Invalid conversion from a non-standard [`std::io::Error`](https://doc.rust-lang.org/std/io/struct.Error.html)
3535 pub const UNKNOWN_IO_ERROR : Error = internal_error ! ( 2 ) ;
3636 /// Call to [`SecRandomCopyBytes`](https://developer.apple.com/documentation/security/1399291-secrandomcopybytes) failed.
3737 pub const SEC_RANDOM_FAILED : Error = internal_error ! ( 3 ) ;
@@ -52,13 +52,6 @@ impl Error {
5252 /// On VxWorks, random number generator is not yet initialized.
5353 pub const RAND_SECURE_FATAL : Error = internal_error ! ( 11 ) ;
5454
55- #[ deprecated( since = "0.1.7" ) ]
56- /// Unknown error.
57- pub const UNKNOWN : Error = Error :: UNSUPPORTED ;
58- #[ deprecated( since = "0.1.7" ) ]
59- /// System entropy source is unavailable.
60- pub const UNAVAILABLE : Error = Error :: UNSUPPORTED ;
61-
6255 /// Codes below this point represent OS Errors (i.e. positive i32 values).
6356 /// Codes at or above this point, but below [`Error::CUSTOM_START`] are
6457 /// reserved for use by the `rand` and `getrandom` crates.
@@ -70,9 +63,11 @@ impl Error {
7063
7164 /// Extract the raw OS error code (if this error came from the OS)
7265 ///
73- /// This method is identical to `std::io::Error::raw_os_error()`, except
66+ /// This method is identical to [ `std::io::Error::raw_os_error()`][1] , except
7467 /// that it works in `no_std` contexts. If this method returns `None`, the
7568 /// error value can still be formatted via the `Display` implementation.
69+ ///
70+ /// [1]: https://doc.rust-lang.org/std/io/struct.Error.html#method.raw_os_error
7671 #[ inline]
7772 pub fn raw_os_error ( self ) -> Option < i32 > {
7873 if self . 0 . get ( ) < Self :: INTERNAL_START {
@@ -171,7 +166,9 @@ fn internal_desc(error: Error) -> Option<&'static str> {
171166 Error :: BINDGEN_GRV_UNDEF => Some ( "wasm-bindgen: crypto.getRandomValues is undefined" ) ,
172167 Error :: STDWEB_NO_RNG => Some ( "stdweb: no randomness source available" ) ,
173168 Error :: STDWEB_RNG_FAILED => Some ( "stdweb: failed to get randomness" ) ,
174- Error :: RAND_SECURE_FATAL => Some ( "randSecure: random number generator module is not initialized" ) ,
169+ Error :: RAND_SECURE_FATAL => {
170+ Some ( "randSecure: random number generator module is not initialized" )
171+ }
175172 _ => None ,
176173 }
177174}
0 commit comments