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 /// # C++ equivalent
/// `int whisper_ctx_init_openvino_encoder(struct whisper_context * ctx, const char * model_path, const char * device, const char * cache_dir);` /// `int whisper_ctx_init_openvino_encoder(struct whisper_context * ctx, const char * model_path, const char * device, const char * cache_dir);`
#[cfg(feature = "openvino")] #[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 model_path = model_path.map(|s| CString::new(s).unwrap());
let device = CString::new(device).unwrap(); let device = CString::new(device).unwrap();
let cache_dir = cache_dir.map(|s| CString::new(s).unwrap()); let cache_dir = cache_dir.map(|s| CString::new(s).unwrap());

View file

@ -26,7 +26,6 @@ fn main() {
); );
} }
let target = env::var("TARGET").unwrap(); let target = env::var("TARGET").unwrap();
// Link C++ standard library // Link C++ standard library
if let Some(cpp_stdlib) = get_cpp_link_stdlib(&target) { if let Some(cpp_stdlib) = get_cpp_link_stdlib(&target) {