common.rs: implement Default for EscapeFlags

This commit is contained in:
Johannes Altmanninger 2023-03-08 23:47:58 +01:00
parent 981e470a2e
commit eb377d3c65

View File

@ -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`].