From eb377d3c65014406f162033ae60f72dce94c4dce Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 8 Mar 2023 23:47:58 +0100 Subject: [PATCH] common.rs: implement Default for EscapeFlags --- fish-rust/src/common.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fish-rust/src/common.rs b/fish-rust/src/common.rs index d0b66e7a0..b1a951142 100644 --- a/fish-rust/src/common.rs +++ b/fish-rust/src/common.rs @@ -150,6 +150,12 @@ pub enum EscapeStringStyle { Regex, } +impl Default for EscapeStringStyle { + fn default() -> Self { + Self::Script(EscapeFlags::default()) + } +} + bitflags! { /// Flags for the [`escape_string()`] function. These are only applicable when the escape style is /// [`EscapeStringStyle::Script`].