Convert Option<&Lrc<T>> return types to Option<&T>.

It's simpler and more concise.
This commit is contained in:
Nicholas Nethercote
2024-10-07 11:03:52 +11:00
parent 55a22d2a63
commit 731469fee5
9 changed files with 28 additions and 30 deletions

View File

@@ -34,8 +34,8 @@ pub struct AnnotateSnippetEmitter {
}
impl Translate for AnnotateSnippetEmitter {
fn fluent_bundle(&self) -> Option<&Lrc<FluentBundle>> {
self.fluent_bundle.as_ref()
fn fluent_bundle(&self) -> Option<&FluentBundle> {
self.fluent_bundle.as_deref()
}
fn fallback_fluent_bundle(&self) -> &FluentBundle {
@@ -69,8 +69,8 @@ impl Emitter for AnnotateSnippetEmitter {
);
}
fn source_map(&self) -> Option<&Lrc<SourceMap>> {
self.source_map.as_ref()
fn source_map(&self) -> Option<&SourceMap> {
self.source_map.as_deref()
}
fn should_show_explain(&self) -> bool {