From 9cc88fb9ee8d4dfd017b76b37d09802d16726487 Mon Sep 17 00:00:00 2001 From: smol <107521333+a-tiny-kirin@users.noreply.github.com> Date: Sun, 16 Jun 2024 03:44:33 +0000 Subject: [PATCH] (automated) deploy from commit ba80bae6e4d491826251811fe9b65287cad2de53 --- src/wiwi/with_cloned/mod.rs.html | 48 ++++++++++++++++++++----- wiwi/index.html | 2 +- wiwi/macro.with_cloned.html | 5 ++- wiwi/with_cloned/index.html | 2 +- wiwi/with_cloned/macro.with_cloned.html | 5 ++- 5 files changed, 45 insertions(+), 17 deletions(-) diff --git a/src/wiwi/with_cloned/mod.rs.html b/src/wiwi/with_cloned/mod.rs.html index 43fc003f1..8da5a1bf4 100644 --- a/src/wiwi/with_cloned/mod.rs.html +++ b/src/wiwi/with_cloned/mod.rs.html @@ -169,6 +169,21 @@ 169 170 171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186
/// Executes code with cloned values, so the executed code
 /// can take ownership of the value without moving the original
 ///
@@ -329,15 +344,30 @@
 /// ```
 #[macro_export]
 macro_rules! with_cloned {
-	{ mut $($thing:ident),+ in $($stuff:tt)* } => {{
-		$(#[allow(unused_mut)] let mut $thing = ::std::clone::Clone::clone(&$thing);)+
-		$($stuff)+
-	}};
-
-	{ $($thing:ident),+ in $($stuff:tt)* } => {{
-		$(#[allow(unused_mut)] let $thing = ::std::clone::Clone::clone(&$thing);)+
-		$($stuff)+
-	}};
+	($($stuff:tt)*) => {
+		// hide potential distracting implementation detail in docs
+		$crate::with_cloned::_with_cloned_impl! { $($stuff)* }
+	}
 }
 pub use with_cloned;
+
+#[doc(hidden)]
+#[macro_export]
+macro_rules! _with_cloned_impl {
+	{ mut $($thing:ident),+ in $($stuff:tt)* } => {
+		{
+			$(#[allow(unused_mut)] let mut $thing = ::std::clone::Clone::clone(&$thing);)+
+			$($stuff)+
+		}
+	};
+
+	{ $($thing:ident),+ in $($stuff:tt)* } => {
+		{
+			$(let $thing = ::std::clone::Clone::clone(&$thing);)+
+			$($stuff)+
+		}
+	};
+}
+#[doc(hidden)]
+pub use _with_cloned_impl;
 
\ No newline at end of file diff --git a/wiwi/index.html b/wiwi/index.html index 1bc2d36c4..a1833fc5d 100644 --- a/wiwi/index.html +++ b/wiwi/index.html @@ -75,7 +75,7 @@

9739ab53.

+

These docs have been built from commit ba80bae6.


  1. Based on the benchmark available in this repo: wiwi is about 21.5x faster in encode, and 7.5x faster in decode. I want better benchmarks though. For now the hex crate also provides more flexibility, whereas wiwi::hex just exposes encode_hex, encode_upper_hex, and decode_hex functions.  

  2. Based on the benchmark available in this repo: wiwi is about 1.4x faster in encode, and 2.2x faster in decode. I want better benchmarks though. There is no functionality that the z85 crate provides, that we don’t also provide (encode_z85 and decode_z85 functions). 

Modules§