Convert Option<&Lrc<T>>
return types to Option<&T>
.
It's simpler and more concise.
This commit is contained in:
parent
55a22d2a63
commit
731469fee5
9 changed files with 28 additions and 30 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue