fix: rustfmt
This commit is contained in:
parent
8b587b97a9
commit
f30d0ea0a1
5 changed files with 18 additions and 18 deletions
|
|
@ -1,7 +1,9 @@
|
|||
use std::ffi::{c_int, CStr};
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::{WhisperInnerContext, WhisperContextParameters, WhisperError, WhisperState, WhisperToken};
|
||||
use crate::{
|
||||
WhisperContextParameters, WhisperError, WhisperInnerContext, WhisperState, WhisperToken,
|
||||
};
|
||||
|
||||
pub struct WhisperContext {
|
||||
ctx: Arc<WhisperInnerContext>,
|
||||
|
|
@ -9,9 +11,7 @@ pub struct WhisperContext {
|
|||
|
||||
impl WhisperContext {
|
||||
fn wrap(ctx: WhisperInnerContext) -> Self {
|
||||
Self {
|
||||
ctx: Arc::new(ctx),
|
||||
}
|
||||
Self { ctx: Arc::new(ctx) }
|
||||
}
|
||||
|
||||
/// Create a new WhisperContext from a file, with parameters.
|
||||
|
|
@ -83,7 +83,6 @@ impl WhisperContext {
|
|||
Ok(Self::wrap(ctx))
|
||||
}
|
||||
|
||||
|
||||
/// Convert the provided text into tokens.
|
||||
///
|
||||
/// # Arguments
|
||||
|
|
@ -453,7 +452,6 @@ impl WhisperContext {
|
|||
self.ctx.full_get_segment_speaker_turn_next(i_segment)
|
||||
}
|
||||
|
||||
|
||||
// we don't implement `whisper_init()` here since i have zero clue what `whisper_model_loader` does
|
||||
|
||||
/// Create a new state object, ready for use.
|
||||
|
|
@ -472,4 +470,4 @@ impl WhisperContext {
|
|||
Ok(WhisperState::new(self.ctx.clone(), state))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue