Skip to content

Commit 8c109d9

Browse files
committed
fmt
1 parent 2c51b31 commit 8c109d9

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

daemon/src/api/v1/package.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,10 @@ pub async fn get_source_packages(
438438
let status_values: Vec<String> = statuses.iter().map(|s| s.to_uppercase()).collect();
439439
query = query.filter(
440440
r1.field(rebuilds::status).is_not_null().and(
441-
r1.field(rebuilds::status).assume_not_null().eq_any(status_values)
442-
)
441+
r1.field(rebuilds::status)
442+
.assume_not_null()
443+
.eq_any(status_values),
444+
),
443445
);
444446
}
445447
}
@@ -471,8 +473,10 @@ pub async fn get_source_packages(
471473
let status_values: Vec<String> = statuses.iter().map(|s| s.to_uppercase()).collect();
472474
count_query = count_query.filter(
473475
r1.field(rebuilds::status).is_not_null().and(
474-
r1.field(rebuilds::status).assume_not_null().eq_any(status_values)
475-
)
476+
r1.field(rebuilds::status)
477+
.assume_not_null()
478+
.eq_any(status_values),
479+
),
476480
);
477481
}
478482
}
@@ -537,8 +541,10 @@ pub async fn get_binary_packages(
537541
let status_values: Vec<String> = statuses.iter().map(|s| s.to_uppercase()).collect();
538542
query = query.filter(
539543
rebuild_artifacts::status.is_not_null().and(
540-
rebuild_artifacts::status.assume_not_null().eq_any(status_values)
541-
)
544+
rebuild_artifacts::status
545+
.assume_not_null()
546+
.eq_any(status_values),
547+
),
542548
);
543549
}
544550
}
@@ -570,8 +576,10 @@ pub async fn get_binary_packages(
570576
let status_values: Vec<String> = statuses.iter().map(|s| s.to_uppercase()).collect();
571577
count_query = count_query.filter(
572578
rebuild_artifacts::status.is_not_null().and(
573-
rebuild_artifacts::status.assume_not_null().eq_any(status_values)
574-
)
579+
rebuild_artifacts::status
580+
.assume_not_null()
581+
.eq_any(status_values),
582+
),
575583
);
576584
}
577585
}

daemon/src/api/v1/util/auth.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ pub fn worker(
2525
req: &HttpRequest,
2626
connection: &mut SqliteConnection,
2727
) -> rebuilderd_common::errors::Result<Worker> {
28-
2928
// Check if auth is required BEFORE trying to extract the header
3029
if cfg.worker.authorized_workers.is_empty() && cfg.worker.signup_secret.is_none() {
3130
// When no auth is configured, try to get the worker key if provided, otherwise use a default key

daemon/src/api/v1/util/filters.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ impl<T: 'static> IntoIdentityFilter<T, Sqlite> for IdentityFilter {
7070
(Some(name), _) => {
7171
// Exact match for name
7272
Box::new(name_column.is(name))
73-
},
73+
}
7474
(None, Some(prefix)) => {
7575
// LIKE pattern for name_starts_with - append % to the prefix
7676
let pattern = format!("{}%", prefix);
7777
Box::new(name_column.like(pattern))
78-
},
78+
}
7979
(None, None) => Box::new(AsExpression::<Bool>::as_expression(true)),
8080
};
8181

@@ -146,7 +146,9 @@ where
146146
};
147147

148148
let component_is: Self::Output = match self.component {
149-
Some(component) if !component.is_empty() => Box::new(source_packages::component.is(component)),
149+
Some(component) if !component.is_empty() => {
150+
Box::new(source_packages::component.is(component))
151+
}
150152
Some(_) => Box::new(source_packages::component.is_null()), // Empty string means NULL
151153
None => Box::new(AsExpression::<Bool>::as_expression(true)),
152154
};

0 commit comments

Comments
 (0)