s/panic/bail/

This commit is contained in:
Nicolas Patry
2023-08-25 18:05:07 +02:00
parent 4826a4212e
commit c105550405
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
use anyhow::{Error as E, Result};
use anyhow::{bail, Error as E, Result};
use clap::Parser;
use candle::{DType, Device, Tensor};
@ -125,7 +125,7 @@ fn main() -> Result<()> {
Some("f16") => DType::F16,
Some("bf16") => DType::BF16,
Some("f32") => DType::F32,
Some(dtype) => panic!("Unsupported dtype {dtype}"),
Some(dtype) => bail!("Unsupported dtype {dtype}"),
None => DType::F16,
};