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

@ -145,7 +145,7 @@ struct BufferEmitter {
}
impl Translate for BufferEmitter {
fn fluent_bundle(&self) -> Option<&Lrc<rustc_errors::FluentBundle>> {
fn fluent_bundle(&self) -> Option<&rustc_errors::FluentBundle> {
None
}
@ -169,7 +169,7 @@ impl Emitter for BufferEmitter {
}
}
fn source_map(&self) -> Option<&Lrc<SourceMap>> {
fn source_map(&self) -> Option<&SourceMap> {
None
}
}

View file

@ -46,7 +46,7 @@ impl SilentOnIgnoredFilesEmitter {
}
impl Translate for SilentOnIgnoredFilesEmitter {
fn fluent_bundle(&self) -> Option<&Lrc<rustc_errors::FluentBundle>> {
fn fluent_bundle(&self) -> Option<&rustc_errors::FluentBundle> {
self.emitter.fluent_bundle()
}
@ -56,7 +56,7 @@ impl Translate for SilentOnIgnoredFilesEmitter {
}
impl Emitter for SilentOnIgnoredFilesEmitter {
fn source_map(&self) -> Option<&Lrc<SourceMap>> {
fn source_map(&self) -> Option<&SourceMap> {
None
}
@ -344,7 +344,7 @@ mod tests {
}
impl Translate for TestEmitter {
fn fluent_bundle(&self) -> Option<&Lrc<rustc_errors::FluentBundle>> {
fn fluent_bundle(&self) -> Option<&rustc_errors::FluentBundle> {
None
}
@ -354,7 +354,7 @@ mod tests {
}
impl Emitter for TestEmitter {
fn source_map(&self) -> Option<&Lrc<SourceMap>> {
fn source_map(&self) -> Option<&SourceMap> {
None
}