Make with take a Copy prefix

Use the `with!` macro otherwise!
This commit is contained in:
Héctor Ramón Jiménez 2025-02-11 03:48:49 +01:00
parent d2d93d0916
commit 080db34849
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -137,9 +137,9 @@ pub fn with<T, R, O>(
prefix: T,
) -> impl FnMut(R) -> O
where
T: Clone,
T: Copy,
{
move |result| f(prefix.clone(), result)
move |result| f(prefix, result)
}
/// Applies the given prefix values to the provided closure in the first