diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-10-07 11:03:52 +1100 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-10-07 13:56:29 +1100 | 
| commit | 731469fee50133528c1904a07da73e739db6f6c4 (patch) | |
| tree | de053a2993fbd3c011f8f25aaf2601fc30ef17ff /compiler/rustc_errors/src/json.rs | |
| parent | 55a22d2a63334e0faff0202b72a31ce832b56125 (diff) | |
| download | rust-731469fee50133528c1904a07da73e739db6f6c4.tar.gz rust-731469fee50133528c1904a07da73e739db6f6c4.zip | |
Convert `Option<&Lrc<T>>` return types to `Option<&T>`.
It's simpler and more concise.
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
| -rw-r--r-- | compiler/rustc_errors/src/json.rs | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs index 1972a522e39..1534e256520 100644 --- a/compiler/rustc_errors/src/json.rs +++ b/compiler/rustc_errors/src/json.rs @@ -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) } | 
