Fix rustdoc compile_fail example

The function name in the example is the std function not this crates.
There is also an unused variable.

Correct the name of the function and prefix the unused vairable with an
underscore.
This commit is contained in:
Jamil Lambert, PhD 2025-05-03 16:09:34 +01:00
parent 282434d4bd
commit 09132b80e1
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 4 additions and 2 deletions

View File

@ -10,8 +10,9 @@ pub trait SliceExt {
/// Note that `N` must not be zero: /// Note that `N` must not be zero:
/// ///
/// ```compile_fail /// ```compile_fail
/// # use bitcoin_internals::slice::SliceExt;
/// let slice = [1, 2, 3]; /// let slice = [1, 2, 3];
/// let fail = slice.as_chunks::<0>(); /// let _fail = slice.bitcoin_as_chunks::<0>();
/// ``` /// ```
fn bitcoin_as_chunks<const N: usize>(&self) -> (&[[Self::Item; N]], &[Self::Item]); fn bitcoin_as_chunks<const N: usize>(&self) -> (&[[Self::Item; N]], &[Self::Item]);
@ -20,8 +21,9 @@ pub trait SliceExt {
/// Note that `N` must not be zero: /// Note that `N` must not be zero:
/// ///
/// ```compile_fail /// ```compile_fail
/// # use bitcoin_internals::slice::SliceExt;
/// let mut slice = [1, 2, 3]; /// let mut slice = [1, 2, 3];
/// let fail = slice.as_chunks_mut::<0>(); /// let _fail = slice.bitcoin_as_chunks_mut::<0>();
/// ``` /// ```
fn bitcoin_as_chunks_mut<const N: usize>( fn bitcoin_as_chunks_mut<const N: usize>(
&mut self, &mut self,