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:
parent
282434d4bd
commit
09132b80e1
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue