From 09132b80e11c51124e58610d2d98d25001df72b2 Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Sat, 3 May 2025 16:09:34 +0100 Subject: [PATCH] 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. --- internals/src/slice.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internals/src/slice.rs b/internals/src/slice.rs index e6ce027d2..630946f34 100644 --- a/internals/src/slice.rs +++ b/internals/src/slice.rs @@ -10,8 +10,9 @@ pub trait SliceExt { /// Note that `N` must not be zero: /// /// ```compile_fail + /// # use bitcoin_internals::slice::SliceExt; /// let slice = [1, 2, 3]; - /// let fail = slice.as_chunks::<0>(); + /// let _fail = slice.bitcoin_as_chunks::<0>(); /// ``` fn bitcoin_as_chunks(&self) -> (&[[Self::Item; N]], &[Self::Item]); @@ -20,8 +21,9 @@ pub trait SliceExt { /// Note that `N` must not be zero: /// /// ```compile_fail + /// # use bitcoin_internals::slice::SliceExt; /// 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( &mut self,