cargo fmt

This commit is contained in:
Zero 2023-08-28 17:09:46 -06:00
parent 6668c4e2aa
commit 749c18cfee
No known key found for this signature in database
GPG key ID: 3861E636EA1E0E2B
2 changed files with 6 additions and 2 deletions

View file

@ -79,7 +79,12 @@ impl WhisperContext {
/// # C++ equivalent
/// `int whisper_ctx_init_openvino_encoder(struct whisper_context * ctx, const char * model_path, const char * device, const char * cache_dir);`
#[cfg(feature = "openvino")]
pub fn init_openvino_encoder(&mut self, model_path: Option<&str>, device: &str, cache_dir: Option<&str>) -> bool {
pub fn init_openvino_encoder(
&mut self,
model_path: Option<&str>,
device: &str,
cache_dir: Option<&str>,
) -> bool {
let model_path = model_path.map(|s| CString::new(s).unwrap());
let device = CString::new(device).unwrap();
let cache_dir = cache_dir.map(|s| CString::new(s).unwrap());