Skip to content

Commit

Permalink
style: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Bear-03 committed Oct 27, 2024
1 parent 67158dc commit fae87c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/vosk/src/recognition/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl BatchRecognizer {
/// Accept and process new chunk of voice data.
///
/// * `data` - Audio data in PCM 16-bit mono format as an array of i8.
pub fn accept_waveform(&mut self, data: &[i8]) -> Result<(), AcceptWaveformError>{
pub fn accept_waveform(&mut self, data: &[i8]) -> Result<(), AcceptWaveformError> {
let len = data.len();

unsafe {
Expand Down
7 changes: 5 additions & 2 deletions crates/vosk/src/recognition/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ use thiserror::Error;
pub enum AcceptWaveformError {
/// Error returned if the user passes in a buffer of a length
/// that exceeds the maximum supported buffer length.
#[error("the length of the provided audio buffer was {0} (expected < {})", i32::MAX)]
#[error(
"the length of the provided audio buffer was {0} (expected < {})",
i32::MAX
)]
BufferTooBig(usize),
}
}
4 changes: 2 additions & 2 deletions crates/vosk/src/recognition/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use std::os::raw::c_int;

#[cfg(feature = "batch")]
mod batch;
mod errors;
mod results;
mod sequential;
mod errors;

#[cfg(feature = "batch")]
pub use batch::BatchRecognizer;
pub use results::*;
pub use errors::*;
pub use results::*;
pub use sequential::Recognizer;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand Down

0 comments on commit fae87c4

Please sign in to comment.