Skip to content

Commit fadccec

Browse files
committed
docs: update ::hex references
1 parent 573ccf3 commit fadccec

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
This crate provides a fast conversion of byte arrays to hexadecimal strings,
99
both at compile time, and at run time.
1010

11-
Extends the [`hex`] crate's implementation with [const-eval], a
12-
[const-generics formatting buffer][buffer], similar to [`itoa`]'s, and more.
11+
It aims to be a drop-in replacement for the [`hex`] crate, as well as extending
12+
the API with [const-eval], a [const-generics formatting buffer][buffer], similar
13+
to [`itoa`]'s, and more.
1314

1415
_Version requirement: rustc 1.64+_
1516

src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
//! This crate provides a fast conversion of byte arrays to hexadecimal strings,
88
//! both at compile time, and at run time.
99
//!
10-
//! Extends the [`hex`] crate's implementation with [const-eval](const_encode), a
10+
//! It aims to be a drop-in replacement for the [`hex`] crate, as well as
11+
//! extending the API with [const-eval](const_encode), a
1112
//! [const-generics formatting buffer](Buffer), similar to [`itoa`]'s, and more.
1213
//!
1314
//! _Version requirement: rustc 1.64+_
1415
//!
1516
//! [`itoa`]: https://docs.rs/itoa/latest/itoa/struct.Buffer.html
16-
#![cfg_attr(not(feature = "hex"), doc = "[`hex`]: https://docs.rs/hex")]
17+
//! [`hex`]: https://docs.rs/hex
18+
1719
#![cfg_attr(not(feature = "std"), no_std)]
1820
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
1921
#![cfg_attr(

src/traits.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ use alloc::{
1919
/// This trait is implemented for all `T` which implement `AsRef<[u8]>`. This
2020
/// includes `String`, `str`, `Vec<u8>` and `[u8]`.
2121
///
22-
/// *Note*: instead of using this trait, you might want to use [`encode`](crate::encode) or [`ToHexExt`].
23-
///
2422
/// # Examples
2523
///
2624
/// ```
@@ -32,7 +30,7 @@ use alloc::{
3230
/// ```
3331
#[cfg_attr(feature = "alloc", doc = "\n[`encode`]: crate::encode")]
3432
#[cfg_attr(not(feature = "alloc"), doc = "\n[`encode`]: crate::encode_to_slice")]
35-
#[deprecated(note = "use `encode` or other specialized functions instead")]
33+
#[deprecated(note = "use `ToHexExt` instead")]
3634
pub trait ToHex {
3735
/// Encode the hex strict representing `self` into the result.
3836
/// Lower case letters are used (e.g. `f9b4ca`).
@@ -43,9 +41,10 @@ pub trait ToHex {
4341
fn encode_hex_upper<T: iter::FromIterator<char>>(&self) -> T;
4442
}
4543

46-
/// Encoding values as hex string with prefix `0x`.
44+
/// Encoding values as hex string.
4745
///
48-
/// This trait is implemented for all `T` which implement `AsRef<[u8]>`.
46+
/// This trait is implemented for all `T` which implement `AsRef<[u8]>`. This
47+
/// includes `String`, `str`, `Vec<u8>` and `[u8]`.
4948
///
5049
/// # Examples
5150
///

0 commit comments

Comments
 (0)