fix: resolve compilation errors in API paths and file descriptor handling
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -76,8 +76,6 @@ fn setup_diff_paths_and_compression(
|
|||||||
|
|
||||||
fn setup_diff_pipes() -> Result<((libc::c_int, libc::c_int), (libc::c_int, libc::c_int)), anyhow::Error> {
|
fn setup_diff_pipes() -> Result<((libc::c_int, libc::c_int), (libc::c_int, libc::c_int)), anyhow::Error> {
|
||||||
use nix::unistd::pipe;
|
use nix::unistd::pipe;
|
||||||
#[allow(unused_imports)]
|
|
||||||
use nix::fcntl::{fcntl, FcntlArg, FdFlag};
|
|
||||||
use nix::Error as NixError;
|
use nix::Error as NixError;
|
||||||
|
|
||||||
// Create pipes for diff's input
|
// Create pipes for diff's input
|
||||||
@@ -86,7 +84,7 @@ fn setup_diff_pipes() -> Result<((libc::c_int, libc::c_int), (libc::c_int, libc:
|
|||||||
let (fd_b_read, fd_b_write) = pipe()
|
let (fd_b_read, fd_b_write) = pipe()
|
||||||
.map_err(|e: NixError| anyhow::anyhow!("Failed to create pipe B: {}", e))?;
|
.map_err(|e: NixError| anyhow::anyhow!("Failed to create pipe B: {}", e))?;
|
||||||
|
|
||||||
Ok(((fd_a_read.into(), fd_a_write.into()), (fd_b_read.into(), fd_b_write.into())))
|
Ok(((fd_a_read, fd_a_write), (fd_b_read, fd_b_write)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ pub async fn handle_post_item(
|
|||||||
(status = 500, description = "Internal server error")
|
(status = 500, description = "Internal server error")
|
||||||
),
|
),
|
||||||
params(
|
params(
|
||||||
("item_id" = i64, Path, description = "ID of the item to delete")
|
("item_id" = String, Path, description = "ID of the item to delete")
|
||||||
),
|
),
|
||||||
security(
|
security(
|
||||||
("bearerAuth" = [])
|
("bearerAuth" = [])
|
||||||
|
|||||||
Reference in New Issue
Block a user