Skip to content

Commit a4eab9b

Browse files
committed
Fix clippy
1 parent 73a1583 commit a4eab9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/onnx-ir/src/from_onnx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ pub fn parse_onnx(onnx_path: &Path) -> OnnxGraph {
359359

360360
// Open the file
361361
let mut file = File::open(onnx_path)
362-
.expect(format!("Unable to open file: {}", onnx_path.display()).as_str());
362+
.unwrap_or_else(|_| panic!("Unable to open file: {}", onnx_path.display()));
363363
let onnx_model: ModelProto =
364364
Message::parse_from_reader(&mut file).expect("Unable to parse ONNX file");
365365

0 commit comments

Comments
 (0)