~cdv/public-inbox

scfg-rs: Implement Directive::take_params v1 APPLIED

Hugo Osvaldo Barrera: 1
 Implement Directive::take_params

 1 files changed, 5 insertions(+), 0 deletions(-)
#1357726 alpine.yml success
#1357727 archlinux.yml success
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/~cdv/public-inbox/patches/55664/mbox | git am -3
Learn more about email & git

[PATCH scfg-rs] Implement Directive::take_params Export this patch

This allows taking a parameters. This allows operating the same
allocated String instances beyond the lifetime of the Directive.
---
 src/lib.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lib.rs b/src/lib.rs
index 65711e4..4acb644 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -260,6 +260,11 @@ impl Directive {
        &self.params
    }

    /// Take this directive's parameters, leaving it empty.
    pub fn take_params(&mut self) -> Vec<String> {
        std::mem::take(&mut self.params)
    }

    /// Appends the supplied parameter. Returns `&mut self` to support method
    /// chaining.
    ///
-- 
2.46.2
Applied. Thanks!
scfg-rs/patches: SUCCESS in 17s

[Implement Directive::take_params][0] from [Hugo Osvaldo Barrera][1]

[0]: https://lists.sr.ht/~cdv/public-inbox/patches/55664
[1]: mailto:hugo@whynothugo.nl

✓ #1357726 SUCCESS scfg-rs/patches/alpine.yml    https://builds.sr.ht/~cdv/job/1357726
✓ #1357727 SUCCESS scfg-rs/patches/archlinux.yml https://builds.sr.ht/~cdv/job/1357727