Skip to content

Commit

Permalink
fix preferred typo
Browse files Browse the repository at this point in the history
  • Loading branch information
meruiden committed Aug 28, 2024
1 parent f0a362e commit 58cba35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/sources/artifact/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod sorting;
mod util;

use self::sorting::sort_preferred_artifact;
use self::sorting::sort_prefered_formats;
use self::sorting::sort_preferred_formats;
use self::util::split_filename_and_extensions;

pub use self::format::ArtifactFormat;
Expand Down Expand Up @@ -181,7 +181,7 @@ impl Artifact {
current_desc
.sort_by_preferred_compat(desc_a, desc_b)
.then_with(|| sort_preferred_artifact(artifact_a, artifact_b))
.then_with(|| sort_prefered_formats(artifact_a, artifact_b))
.then_with(|| sort_preferred_formats(artifact_a, artifact_b))
});

compatible_artifacts
Expand Down
4 changes: 2 additions & 2 deletions lib/sources/artifact/sorting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn word_is_not_arch_or_os_or_version_or_numeric(word: impl AsRef<str>) -> bool {
&& !word.chars().all(char::is_numeric)
}

pub(super) fn sort_prefered_formats(artifact_a: &Artifact, artifact_b: &Artifact) -> Ordering {
pub(super) fn sort_preferred_formats(artifact_a: &Artifact, artifact_b: &Artifact) -> Ordering {
let a_is_known = artifact_a.format.is_some();
let b_is_known = artifact_b.format.is_some();

Expand Down Expand Up @@ -200,7 +200,7 @@ mod tests {
})
.collect::<Vec<_>>();

artifacts.sort_by(sort_prefered_formats);
artifacts.sort_by(sort_preferred_formats);

let artifact_names_sorted = artifacts
.iter()
Expand Down

0 comments on commit 58cba35

Please sign in to comment.