From: Matt Corallo Date: Mon, 1 Nov 2021 18:35:43 +0000 (+0000) Subject: Implement additional `Into` auto-conversion X-Git-Tag: v0.0.103.0^2~6 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=9d0db8cf4576ba68540287118de35bde9337c028;p=ldk-c-bindings Implement additional `Into` auto-conversion --- diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index 6931956..c0c44bc 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -450,6 +450,13 @@ impl Into for &'static str { Str { chars: self.as_ptr(), len: self.len(), chars_is_owned: false } } } +impl Into for &mut &'static str { + fn into(self) -> Str { + let us: &'static str = *self; + us.into() + } +} + impl Str { pub(crate) fn into_str(&self) -> &'static str { if self.len == 0 { return ""; }