mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Adjust comments
This commit is contained in:
parent
958f2fc962
commit
5c3b38086f
@ -254,9 +254,9 @@ fn render_report(per_package_reports: &[FutureIncompatReportPackage]) -> BTreeMa
|
||||
report
|
||||
}
|
||||
|
||||
// Returns a pair (compatible_updates, incompatible_updates),
|
||||
// of semver-compatible and semver-incompatible update versions,
|
||||
// respectively.
|
||||
/// Returns a user-readable message explaining which of
|
||||
/// the packages in `package_ids` have updates available.
|
||||
/// This is best-effort - if an error occurs, `None` will be returned.
|
||||
fn get_updates(ws: &Workspace<'_>, package_ids: &BTreeSet<PackageId>) -> Option<String> {
|
||||
// This in general ignores all errors since this is opportunistic.
|
||||
let _lock = ws.config().acquire_package_cache_lock().ok()?;
|
||||
@ -312,7 +312,10 @@ fn get_updates(ws: &Workspace<'_>, package_ids: &BTreeSet<PackageId>) -> Option<
|
||||
Some(updates)
|
||||
}
|
||||
|
||||
pub fn render_message(
|
||||
/// Writes a future-incompat report to disk, using the per-package
|
||||
/// reports gathered during the build. If requested by the user,
|
||||
/// a message is also displayed in the build output.
|
||||
pub fn save_and_display_report(
|
||||
bcx: &BuildContext<'_, '_>,
|
||||
per_package_future_incompat_reports: &[FutureIncompatReportPackage],
|
||||
) {
|
||||
|
@ -871,7 +871,7 @@ impl<'cfg> DrainState<'cfg> {
|
||||
if !cx.bcx.build_config.build_plan {
|
||||
// It doesn't really matter if this fails.
|
||||
drop(cx.bcx.config.shell().status("Finished", message));
|
||||
future_incompat::render_message(cx.bcx, &self.per_package_future_incompat_reports);
|
||||
future_incompat::save_and_display_report(cx.bcx, &self.per_package_future_incompat_reports);
|
||||
}
|
||||
|
||||
None
|
||||
|
@ -269,7 +269,6 @@ fn test_multi_crate() {
|
||||
.exec_with_output()
|
||||
.unwrap();
|
||||
let output = std::str::from_utf8(&output.stdout).unwrap();
|
||||
//if true { panic!("Got output: \n{}", output) }
|
||||
assert!(output.starts_with("The following warnings were discovered"));
|
||||
let mut lines = output
|
||||
.lines()
|
||||
|
Loading…
x
Reference in New Issue
Block a user