Skip to content

Commit 1d028cc

Browse files
authored
Small cleanup: remove unneeded result (#15256)
2 parents 6dbd222 + 08b3944 commit 1d028cc

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/cargo/core/compiler/job_queue/job_state.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,11 @@ impl<'a, 'gctx> JobState<'a, 'gctx> {
125125
}
126126

127127
/// See [`Message::Warning`].
128-
pub fn warning(&self, warning: String) -> CargoResult<()> {
128+
pub fn warning(&self, warning: String) {
129129
self.messages.push_bounded(Message::Warning {
130130
id: self.id,
131131
warning,
132132
});
133-
Ok(())
134133
}
135134

136135
/// A method used to signal to the coordinator thread that the rmeta file

src/cargo/core/compiler/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ fn rustc(
449449

450450
if let Err(e) = result {
451451
if let Some(diagnostic) = failed_scrape_diagnostic {
452-
state.warning(diagnostic)?;
452+
state.warning(diagnostic);
453453
}
454454

455455
return Err(e);
@@ -920,7 +920,7 @@ fn rustdoc(build_runner: &mut BuildRunner<'_, '_>, unit: &Unit) -> CargoResult<W
920920

921921
if let Err(e) = result {
922922
if let Some(diagnostic) = failed_scrape_diagnostic {
923-
state.warning(diagnostic)?;
923+
state.warning(diagnostic);
924924
}
925925

926926
return Err(e);

0 commit comments

Comments
 (0)