mirror of
https://github.com/openai/codex.git
synced 2026-05-29 23:40:29 +00:00
Fix stdio transport clippy issues
Keep the stack-introduced stdio transport variant explicit while avoiding dead-code and redundant-pattern lints reported by PR20664 CI. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -49,6 +49,7 @@ pub(crate) struct StdioExecServerCommand {
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub(crate) enum ExecServerTransportParams {
|
||||
WebSocketUrl(String),
|
||||
#[allow(dead_code)]
|
||||
StdioCommand(StdioExecServerCommand),
|
||||
}
|
||||
|
||||
|
||||
@@ -26,14 +26,16 @@ pub(crate) enum JsonRpcConnectionEvent {
|
||||
|
||||
pub(crate) enum JsonRpcTransport {
|
||||
Plain,
|
||||
Stdio(StdioTransport),
|
||||
Stdio { _transport: StdioTransport },
|
||||
}
|
||||
|
||||
impl JsonRpcTransport {
|
||||
fn from_child_process(child_process: Child) -> Self {
|
||||
Self::Stdio(StdioTransport {
|
||||
child_process: Some(child_process),
|
||||
})
|
||||
Self::Stdio {
|
||||
_transport: StdioTransport {
|
||||
child_process: Some(child_process),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ impl RpcClient {
|
||||
pub(crate) fn new(connection: JsonRpcConnection) -> (Self, mpsc::Receiver<RpcClientEvent>) {
|
||||
let JsonRpcConnection {
|
||||
outgoing_tx: write_tx,
|
||||
incoming_rx: mut incoming_rx,
|
||||
mut incoming_rx,
|
||||
disconnected_rx,
|
||||
task_handles: transport_tasks,
|
||||
transport,
|
||||
|
||||
@@ -49,8 +49,8 @@ async fn run_connection(
|
||||
let router = Arc::new(build_router());
|
||||
let JsonRpcConnection {
|
||||
outgoing_tx: json_outgoing_tx,
|
||||
incoming_rx: mut incoming_rx,
|
||||
disconnected_rx: mut disconnected_rx,
|
||||
mut incoming_rx,
|
||||
mut disconnected_rx,
|
||||
task_handles: connection_tasks,
|
||||
transport: _transport,
|
||||
} = connection;
|
||||
|
||||
Reference in New Issue
Block a user