1
Fork 0

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

@ -111,8 +111,8 @@ enum EmitTyped<'a> {
}
impl Translate for JsonEmitter {
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 {
@ -172,7 +172,7 @@ impl Emitter for JsonEmitter {
}
}
fn source_map(&self) -> Option<&Lrc<SourceMap>> {
fn source_map(&self) -> Option<&SourceMap> {
Some(&self.sm)
}