Skip to content

Small cleanup: remove unneeded result #15256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/cargo/core/compiler/job_queue/job_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,11 @@ impl<'a, 'gctx> JobState<'a, 'gctx> {
}

/// See [`Message::Warning`].
pub fn warning(&self, warning: String) -> CargoResult<()> {
pub fn warning(&self, warning: String) {
self.messages.push_bounded(Message::Warning {
id: self.id,
warning,
});
Ok(())
}

/// A method used to signal to the coordinator thread that the rmeta file
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ fn rustc(

if let Err(e) = result {
if let Some(diagnostic) = failed_scrape_diagnostic {
state.warning(diagnostic)?;
state.warning(diagnostic);
}

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

if let Err(e) = result {
if let Some(diagnostic) = failed_scrape_diagnostic {
state.warning(diagnostic)?;
state.warning(diagnostic);
}

return Err(e);
Expand Down