mirror of
https://github.com/openai/codex.git
synced 2026-11-26 07:26:11 +00:00
fix: fix clippy issue in examples/ folder (#18184)
I believe this use of `expect()` was introduced in https://github.com/openai/codex/pull/17826, but was not flagged by CI. Though I did see it in the diagnostics panel in VS Code, so it's worth cleaning up. I guess our current CI does include `examples/` when running Clippy?
This commit is contained in:
1 parent
8720b7bdce
commit
ea34c6ed8d
1 file changed
+6
-1
@@ -1,7 +1,12 @@
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
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");
|
let proto_file = proto_dir.join("codex.thread_store.v1.proto");
|
||||||
|
|
||||||
tonic_prost_build::configure()
|
tonic_prost_build::configure()
|
||||||
|
|||||||
Reference in new issue
Block a user