From 1621ca45b65cb28d0281397c42ed6fc2edfe96c0 Mon Sep 17 00:00:00 2001 From: Avril Date: Tue, 23 Mar 2021 14:41:25 +0000 Subject: [PATCH] prevent inlining of prune on explicit_clear nightly builds --- src/stream.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stream.rs b/src/stream.rs index 3b22a20..587888a 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -118,6 +118,7 @@ where W: Write /// Clear the internal buffer while keeping it allocated for further use. /// /// This does not affect operations at all, all it does is 0 out the left-over temporary buffer from the last operation(s). + #[cfg_attr(all(nightly, feature="explicit_clear"), inline(never))] // We don't want this asm! being inlined and preventing other optimisations on caller functions. pub fn prune(&mut self) { #[cfg(feature="explicit_clear")]