fix: resolve clippy warnings in phase 3 backend
This commit is contained in:
parent
3178da4692
commit
512e502f9b
2 changed files with 8 additions and 7 deletions
|
|
@ -91,6 +91,7 @@ impl ProcessedTicket {
|
|||
Ok(count > 0)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn list_by_tracker(conn: &Connection, tracker_id: &str) -> Result<Vec<ProcessedTicket>> {
|
||||
let sql = format!(
|
||||
"{} WHERE tracker_id = ?1 ORDER BY detected_at DESC",
|
||||
|
|
|
|||
|
|
@ -240,13 +240,13 @@ async fn process_ticket(db: &Arc<Mutex<Connection>>, app_handle: &AppHandle) ->
|
|||
}
|
||||
|
||||
let (wt_path, branch_name) =
|
||||
worktree_manager::create_worktree(&project.path, &project.base_branch, ticket.artifact_id).map_err(|e| {
|
||||
let conn = db.lock().ok();
|
||||
if let Some(conn) = conn {
|
||||
let _ = ProcessedTicket::set_error(&conn, &ticket.id, &e);
|
||||
}
|
||||
e
|
||||
})?;
|
||||
worktree_manager::create_worktree(&project.path, &project.base_branch, ticket.artifact_id)
|
||||
.inspect_err(|e| {
|
||||
let conn = db.lock().ok();
|
||||
if let Some(conn) = conn {
|
||||
let _ = ProcessedTicket::set_error(&conn, &ticket.id, e);
|
||||
}
|
||||
})?;
|
||||
|
||||
{
|
||||
let conn = db.lock().map_err(|e| format!("DB lock: {}", e))?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue