treewide: address all clippy lints
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I5cf55cc4cb558c3f9f764c71224e87176a6a6964
This commit is contained in:
parent
967d51e867
commit
a127f3f62c
63 changed files with 1790 additions and 1089 deletions
|
|
@ -6,6 +6,11 @@ use crate::{
|
|||
models::{BuildStep, CreateBuildStep},
|
||||
};
|
||||
|
||||
/// Create a build step record.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns error if database insert fails or step already exists.
|
||||
pub async fn create(
|
||||
pool: &PgPool,
|
||||
input: CreateBuildStep,
|
||||
|
|
@ -32,6 +37,11 @@ pub async fn create(
|
|||
})
|
||||
}
|
||||
|
||||
/// Mark a build step as completed.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns error if database update fails or step not found.
|
||||
pub async fn complete(
|
||||
pool: &PgPool,
|
||||
id: Uuid,
|
||||
|
|
@ -52,6 +62,11 @@ pub async fn complete(
|
|||
.ok_or_else(|| CiError::NotFound(format!("Build step {id} not found")))
|
||||
}
|
||||
|
||||
/// List all build steps for a build.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns error if database query fails.
|
||||
pub async fn list_for_build(
|
||||
pool: &PgPool,
|
||||
build_id: Uuid,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue