~ireas/public-inbox

Replace vector instead of appending to it v1 PROPOSED

René Kijewski: 1
 Replace vector instead of appending to it

 1 files changed, 2 insertions(+), 2 deletions(-)
Hi René,

thanks for the patches!  You don’t have to resend them, I’ll have a look
at them later today or tomorrow.

Best,
Robin
Hi Robin,

I hope you had a happy Easter!
Could you have a look at my PRs if you find the time? :)

Cheers
René
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~ireas/public-inbox/patches/30791/mbox | git am -3
Learn more about email & git

[PATCH] Replace vector instead of appending to it Export this patch

This eliminates the need to move the inner elements.
---
 src/lib.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib.rs b/src/lib.rs
index ab9b4ab..011f3e6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -243,9 +243,9 @@ pub mod ord {
#[cfg(feature = "std")]
pub mod vec {
    /// Overwrite left with right if left is empty.
    pub fn overwrite_empty<T>(left: &mut Vec<T>, mut right: Vec<T>) {
    pub fn overwrite_empty<T>(left: &mut Vec<T>, right: Vec<T>) {
        if left.is_empty() {
            left.append(&mut right);
            *left = right;
        }
    }

-- 
2.35.1
Hi Robin,

sorry, I did not notice that my version of git-send-email does not seem to understand "--subject-prefix".
Should I re-send my two patches with a proper subject line?

Cheers
René