~ireas/public-inbox

merge-rs: Allow always overwrite of vectors v1 PROPOSED

Eclextic: 1
 Allow always overwrite of vectors

 1 files changed, 5 insertions(+), 0 deletions(-)
#1096934 archlinux-msrv.yml failed
#1096935 archlinux.yml failed
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/46819/mbox | git am -3
Learn more about email & git

[PATCH merge-rs] Allow always overwrite of vectors Export this patch

From: TangerineGameDev <81909104+Eclextic@users.noreply.github.com>

---
 src/lib.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lib.rs b/src/lib.rs
index 6d3a288..4ad47ae 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -262,6 +262,11 @@ pub mod ord {
/// These strategies are only available if the `std` feature is enabled.
#[cfg(feature = "std")]
pub mod vec {
    /// Overwrite left with right regardless of the value.
    pub fn overwrite<T>(left: &mut Vec<T>, right: Vec<T>) {
        *left = right
    }

    /// Overwrite left with right if left is empty.
    pub fn overwrite_empty<T>(left: &mut Vec<T>, mut right: Vec<T>) {
        if left.is_empty() {
-- 
2.42.1
merge-rs/patches: FAILED in 6m47s

[Allow always overwrite of vectors][0] from [Eclextic][1]

[0]: https://lists.sr.ht/~ireas/public-inbox/patches/46819
[1]: mailto:hia3forme@gmail.com

✗ #1096935 FAILED merge-rs/patches/archlinux.yml      https://builds.sr.ht/~ireas/job/1096935
✗ #1096934 FAILED merge-rs/patches/archlinux-msrv.yml https://builds.sr.ht/~ireas/job/1096934