Cargo fmt

This commit is contained in:
Chris Raethke 2023-11-21 06:33:02 +10:00
parent 8d462f5dd3
commit 81e2b0476b
2 changed files with 5 additions and 6 deletions

View file

@ -11,8 +11,9 @@ fn main() -> Result<(), &'static str> {
// Load a context and model.
let ctx = WhisperContext::new_with_params(
"example/path/to/model/whisper.cpp/models/ggml-base.en.bin",
WhisperContextParameters::default()
).expect("failed to load model");
WhisperContextParameters::default(),
)
.expect("failed to load model");
// Create a state
let mut state = ctx.create_state().expect("failed to create key");

View file

@ -7,10 +7,8 @@ use whisper_rs::{FullParams, SamplingStrategy, WhisperContext, WhisperContextPar
// more dependencies than the base library.
pub fn usage() -> Result<(), &'static str> {
// load a context and model
let ctx = WhisperContext::new_with_params(
"path/to/model",
WhisperContextParameters::default()
).expect("failed to load model");
let ctx = WhisperContext::new_with_params("path/to/model", WhisperContextParameters::default())
.expect("failed to load model");
// make a state
let mut state = ctx.create_state().expect("failed to create state");