Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: fix clippy issue in examples/ folder (#18184)

Michael Bolinea34c6ed8de8
diff --git a/codex-rs/thread-store/examples/generate-proto.rs b/codex-rs/thread-store/examples/generate-proto.rs
index aa159f5bcb..0b4afb54f9 100644
--- a/codex-rs/thread-store/examples/generate-proto.rs
+++ b/codex-rs/thread-store/examples/generate-proto.rs
@@ -1,7 +1,12 @@
use std::path::PathBuf;
fn main() -> Result<(), Box<dyn std::error::Error>> {
- let proto_dir = PathBuf::from(std::env::args().nth(1).expect("proto dir"));
+ let Some(proto_dir_arg) = std::env::args().nth(1) else {
+ eprintln!("Usage: generate-proto <proto-dir>");
+ std::process::exit(1);
+ };
+
+ let proto_dir = PathBuf::from(proto_dir_arg);
let proto_file = proto_dir.join("codex.thread_store.v1.proto");
tonic_prost_build::configure()