cargo fmt

This commit is contained in:
Alyssa Ross 2022-02-02 13:15:31 +00:00
parent 536eae767a
commit f9d47ab4f7
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0
2 changed files with 22 additions and 18 deletions

View file

@ -63,43 +63,43 @@ mod tests {
#[test] #[test]
fn staging_18_03() { fn staging_18_03() {
let res = next_branches("staging-18.03"); let res = next_branches("staging-18.03");
assert_eq!(res, vec!["release-18.03"]); assert_eq!(res, vec!["release-18.03"]);
} }
#[test] #[test]
fn staging_20_09() { fn staging_20_09() {
let res = next_branches("staging-20.09"); let res = next_branches("staging-20.09");
assert_eq!(res, vec!["release-20.09"]); assert_eq!(res, vec!["release-20.09"]);
} }
#[test] #[test]
fn staging_21_05() { fn staging_21_05() {
let res = next_branches("staging-21.05"); let res = next_branches("staging-21.05");
assert_eq!(res, vec!["staging-next-21.05"]); assert_eq!(res, vec!["staging-next-21.05"]);
} }
#[test] #[test]
fn staging_30_05() { fn staging_30_05() {
let res = next_branches("staging-30.05"); let res = next_branches("staging-30.05");
assert_eq!(res, vec!["staging-next-30.05"]); assert_eq!(res, vec!["staging-next-30.05"]);
} }
#[test] #[test]
fn staging_00_11() { fn staging_00_11() {
let res = next_branches("staging-00.11"); let res = next_branches("staging-00.11");
assert_eq!(res, vec!["staging-next-00.11"]); assert_eq!(res, vec!["staging-next-00.11"]);
} }
#[test] #[test]
fn staging_next_21_05() { fn staging_next_21_05() {
let res = next_branches("staging-next-21.05"); let res = next_branches("staging-next-21.05");
assert_eq!(res, vec!["release-21.05"]); assert_eq!(res, vec!["release-21.05"]);
} }
#[test] #[test]
fn release_20_09() { fn release_20_09() {
let res = next_branches("release-20.09"); let res = next_branches("release-20.09");
assert_eq!(res, vec!["nixpkgs-20.09-darwin", "nixos-20.09-small"]); assert_eq!(res, vec!["nixpkgs-20.09-darwin", "nixos-20.09-small"]);
} }
} }

View file

@ -46,7 +46,11 @@ impl Tree {
} }
} }
pub async fn make(base_branch: String, merge_status: &github::PullRequestStatus, nixpkgs: &Nixpkgs<'_>) -> Tree { pub async fn make(
base_branch: String,
merge_status: &github::PullRequestStatus,
nixpkgs: &Nixpkgs<'_>,
) -> Tree {
let mut missing_means_absent = true; let mut missing_means_absent = true;
let mut branches = BTreeSet::new(); let mut branches = BTreeSet::new();
@ -59,9 +63,9 @@ impl Tree {
if let Some(merge_commit) = merge_commit_oid { if let Some(merge_commit) = merge_commit_oid {
let mut containing_commits = BTreeSet::new(); let mut containing_commits = BTreeSet::new();
if let Err(e) = if let Err(e) = nixpkgs
nixpkgs.branches_containing_commit(&merge_commit, &mut containing_commits) .branches_containing_commit(&merge_commit, &mut containing_commits)
.await .await
{ {
eprintln!("pr-tracker: branches_containing_commit: {}", e); eprintln!("pr-tracker: branches_containing_commit: {}", e);
missing_means_absent = false; missing_means_absent = false;