diff options
| -rw-r--r-- | mingling_picker/src/parselib/style.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mingling_picker/src/parselib/style.rs b/mingling_picker/src/parselib/style.rs index c0eb58f..770ef05 100644 --- a/mingling_picker/src/parselib/style.rs +++ b/mingling_picker/src/parselib/style.rs @@ -75,12 +75,8 @@ impl<'a> ParserStyle<'a> { } } - /// Returns the global parser style, or `None` if not yet set. - pub fn global_style() -> Option<&'static ParserStyle<'static>> { - if GLOBAL_STYLE_SET.load(Ordering::Acquire) { - GLOBAL_STYLE.get() - } else { - None - } + /// Returns the global parser style, falling back to `UNIX_STYLE` if not set. + pub fn global_style() -> &'static ParserStyle<'static> { + GLOBAL_STYLE.get().unwrap_or(&UNIX_STYLE) } } |
