Skip to content

Commit

Permalink
Nit: change Updated to Upgraded for consistency (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
u-train authored Nov 11, 2024
1 parent 9c04226 commit 24312a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/commands/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{collections::BTreeSet, io::Write};
pub(crate) enum DependencyChange {
Added(PackageId),
Removed(PackageId),
Updated { from: PackageId, to: PackageId },
Upgraded { from: PackageId, to: PackageId },
Downgraded { from: PackageId, to: PackageId },
}

Expand Down Expand Up @@ -42,7 +42,7 @@ pub(crate) fn generate_dependency_changes(
dependency.push(
match (old_matches.next().cloned(), new_matches.next().cloned()) {
(Some(old), Some(new)) if old.le(&new) => {
DependencyChange::Updated { from: old, to: new }
DependencyChange::Upgraded { from: old, to: new }
}
(Some(old), Some(new)) => DependencyChange::Downgraded { from: old, to: new },

Expand Down Expand Up @@ -102,7 +102,7 @@ pub(crate) fn render_update_difference(
package_id.name(),
package_id.version()
),
DependencyChange::Updated { from, to } => writeln!(
DependencyChange::Upgraded { from, to } => writeln!(
writer,
"{} Updated {}{} from v{} to v{}",
SetForegroundColor(Color::DarkCyan),
Expand Down Expand Up @@ -159,7 +159,7 @@ mod test {
($changes:expr, $from_package_id:literal, $to_package_id:literal) => {
$changes.iter().any(|change| {
*change
== super::DependencyChange::Updated {
== super::DependencyChange::Upgraded {
from: package_id!($from_package_id),
to: package_id!($to_package_id),
}
Expand Down

0 comments on commit 24312a0

Please sign in to comment.