From 623e5a40cb0226882ad420506b873b9e09473870 Mon Sep 17 00:00:00 2001 From: Niko Date: Wed, 13 Aug 2025 13:17:15 -0700 Subject: [PATCH] Remove inline attributes --- src/whisper_ctx.rs | 27 --------------------------- src/whisper_ctx_wrapper.rs | 26 -------------------------- src/whisper_state.rs | 4 ---- 3 files changed, 57 deletions(-) diff --git a/src/whisper_ctx.rs b/src/whisper_ctx.rs index ee36ff0..1f65624 100644 --- a/src/whisper_ctx.rs +++ b/src/whisper_ctx.rs @@ -114,7 +114,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_n_vocab (struct whisper_context * ctx)` - #[inline] pub fn n_vocab(&self) -> c_int { unsafe { whisper_rs_sys::whisper_n_vocab(self.ctx) } } @@ -126,7 +125,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_n_text_ctx (struct whisper_context * ctx);` - #[inline] pub fn n_text_ctx(&self) -> c_int { unsafe { whisper_rs_sys::whisper_n_text_ctx(self.ctx) } } @@ -138,7 +136,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_n_audio_ctx (struct whisper_context * ctx);` - #[inline] pub fn n_audio_ctx(&self) -> c_int { unsafe { whisper_rs_sys::whisper_n_audio_ctx(self.ctx) } } @@ -147,7 +144,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_is_multilingual(struct whisper_context * ctx)` - #[inline] pub fn is_multilingual(&self) -> bool { unsafe { whisper_rs_sys::whisper_is_multilingual(self.ctx) != 0 } } @@ -159,7 +155,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_vocab (struct whisper_context * ctx);` - #[inline] pub fn model_n_vocab(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_vocab(self.ctx) } } @@ -171,7 +166,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_audio_ctx (struct whisper_context * ctx)` - #[inline] pub fn model_n_audio_ctx(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_audio_ctx(self.ctx) } } @@ -183,7 +177,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_audio_state(struct whisper_context * ctx);` - #[inline] pub fn model_n_audio_state(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_audio_state(self.ctx) } } @@ -195,7 +188,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_audio_head (struct whisper_context * ctx);` - #[inline] pub fn model_n_audio_head(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_audio_head(self.ctx) } } @@ -207,7 +199,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_audio_layer(struct whisper_context * ctx);` - #[inline] pub fn model_n_audio_layer(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_audio_layer(self.ctx) } } @@ -219,7 +210,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_text_ctx (struct whisper_context * ctx)` - #[inline] pub fn model_n_text_ctx(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_text_ctx(self.ctx) } } @@ -231,7 +221,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_text_state (struct whisper_context * ctx);` - #[inline] pub fn model_n_text_state(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_text_state(self.ctx) } } @@ -243,7 +232,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_text_head (struct whisper_context * ctx);` - #[inline] pub fn model_n_text_head(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_text_head(self.ctx) } } @@ -255,7 +243,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_text_layer (struct whisper_context * ctx);` - #[inline] pub fn model_n_text_layer(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_text_layer(self.ctx) } } @@ -267,7 +254,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_n_mels (struct whisper_context * ctx);` - #[inline] pub fn model_n_mels(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_n_mels(self.ctx) } } @@ -279,7 +265,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_ftype (struct whisper_context * ctx);` - #[inline] pub fn model_ftype(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_ftype(self.ctx) } } @@ -291,7 +276,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `int whisper_model_type (struct whisper_context * ctx);` - #[inline] pub fn model_type(&self) -> c_int { unsafe { whisper_rs_sys::whisper_model_type(self.ctx) } } @@ -350,7 +334,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `whisper_token whisper_token_eot (struct whisper_context * ctx)` - #[inline] pub fn token_eot(&self) -> WhisperTokenId { unsafe { whisper_rs_sys::whisper_token_eot(self.ctx) } } @@ -359,7 +342,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `whisper_token whisper_token_sot (struct whisper_context * ctx)` - #[inline] pub fn token_sot(&self) -> WhisperTokenId { unsafe { whisper_rs_sys::whisper_token_sot(self.ctx) } } @@ -368,7 +350,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `whisper_token whisper_token_solm(struct whisper_context * ctx)` - #[inline] pub fn token_solm(&self) -> WhisperTokenId { unsafe { whisper_rs_sys::whisper_token_solm(self.ctx) } } @@ -377,7 +358,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `whisper_token whisper_token_prev(struct whisper_context * ctx)` - #[inline] pub fn token_prev(&self) -> WhisperTokenId { unsafe { whisper_rs_sys::whisper_token_prev(self.ctx) } } @@ -386,7 +366,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `whisper_token whisper_token_nosp(struct whisper_context * ctx)` - #[inline] pub fn token_nosp(&self) -> WhisperTokenId { unsafe { whisper_rs_sys::whisper_token_nosp(self.ctx) } } @@ -395,7 +374,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `whisper_token whisper_token_not (struct whisper_context * ctx)` - #[inline] pub fn token_not(&self) -> WhisperTokenId { unsafe { whisper_rs_sys::whisper_token_not(self.ctx) } } @@ -404,7 +382,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `whisper_token whisper_token_beg (struct whisper_context * ctx)` - #[inline] pub fn token_beg(&self) -> WhisperTokenId { unsafe { whisper_rs_sys::whisper_token_beg(self.ctx) } } @@ -416,7 +393,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `whisper_token whisper_token_lang(struct whisper_context * ctx, int lang_id)` - #[inline] pub fn token_lang(&self, lang_id: c_int) -> WhisperTokenId { unsafe { whisper_rs_sys::whisper_token_lang(self.ctx, lang_id) } } @@ -425,7 +401,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `void whisper_print_timings(struct whisper_context * ctx)` - #[inline] pub fn print_timings(&self) { unsafe { whisper_rs_sys::whisper_print_timings(self.ctx) } } @@ -434,7 +409,6 @@ impl WhisperInnerContext { /// /// # C++ equivalent /// `void whisper_reset_timings(struct whisper_context * ctx)` - #[inline] pub fn reset_timings(&self) { unsafe { whisper_rs_sys::whisper_reset_timings(self.ctx) } } @@ -458,7 +432,6 @@ impl WhisperInnerContext { } impl Drop for WhisperInnerContext { - #[inline] fn drop(&mut self) { unsafe { whisper_rs_sys::whisper_free(self.ctx) }; } diff --git a/src/whisper_ctx_wrapper.rs b/src/whisper_ctx_wrapper.rs index 3635538..653fbb6 100644 --- a/src/whisper_ctx_wrapper.rs +++ b/src/whisper_ctx_wrapper.rs @@ -76,7 +76,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_n_vocab (struct whisper_context * ctx)` - #[inline] pub fn n_vocab(&self) -> c_int { self.ctx.n_vocab() } @@ -88,7 +87,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_n_text_ctx (struct whisper_context * ctx);` - #[inline] pub fn n_text_ctx(&self) -> c_int { self.ctx.n_text_ctx() } @@ -100,7 +98,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_n_audio_ctx (struct whisper_context * ctx);` - #[inline] pub fn n_audio_ctx(&self) -> c_int { self.ctx.n_audio_ctx() } @@ -109,7 +106,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_is_multilingual(struct whisper_context * ctx)` - #[inline] pub fn is_multilingual(&self) -> bool { self.ctx.is_multilingual() } @@ -121,7 +117,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_vocab (struct whisper_context * ctx);` - #[inline] pub fn model_n_vocab(&self) -> c_int { self.ctx.model_n_vocab() } @@ -133,7 +128,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_audio_ctx (struct whisper_context * ctx)` - #[inline] pub fn model_n_audio_ctx(&self) -> c_int { self.ctx.model_n_audio_ctx() } @@ -145,7 +139,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_audio_state(struct whisper_context * ctx);` - #[inline] pub fn model_n_audio_state(&self) -> c_int { self.ctx.model_n_audio_state() } @@ -157,7 +150,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_audio_head (struct whisper_context * ctx);` - #[inline] pub fn model_n_audio_head(&self) -> c_int { self.ctx.model_n_audio_head() } @@ -169,7 +161,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_audio_layer(struct whisper_context * ctx);` - #[inline] pub fn model_n_audio_layer(&self) -> c_int { self.ctx.model_n_audio_layer() } @@ -181,7 +172,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_text_ctx (struct whisper_context * ctx)` - #[inline] pub fn model_n_text_ctx(&self) -> c_int { self.ctx.model_n_text_ctx() } @@ -193,7 +183,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_text_state (struct whisper_context * ctx);` - #[inline] pub fn model_n_text_state(&self) -> c_int { self.ctx.model_n_text_state() } @@ -205,7 +194,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_text_head (struct whisper_context * ctx);` - #[inline] pub fn model_n_text_head(&self) -> c_int { self.ctx.model_n_text_head() } @@ -217,7 +205,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_text_layer (struct whisper_context * ctx);` - #[inline] pub fn model_n_text_layer(&self) -> c_int { self.ctx.model_n_text_layer() } @@ -229,7 +216,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_n_mels (struct whisper_context * ctx);` - #[inline] pub fn model_n_mels(&self) -> c_int { self.ctx.model_n_mels() } @@ -241,7 +227,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_ftype (struct whisper_context * ctx);` - #[inline] pub fn model_ftype(&self) -> c_int { self.ctx.model_ftype() } @@ -253,7 +238,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `int whisper_model_type (struct whisper_context * ctx);` - #[inline] pub fn model_type(&self) -> c_int { self.ctx.model_type() } @@ -300,7 +284,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_token_eot (struct whisper_context * ctx)` - #[inline] pub fn token_eot(&self) -> WhisperTokenId { self.ctx.token_eot() } @@ -309,7 +292,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_token_sot (struct whisper_context * ctx)` - #[inline] pub fn token_sot(&self) -> WhisperTokenId { self.ctx.token_sot() } @@ -318,7 +300,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_token_solm(struct whisper_context * ctx)` - #[inline] pub fn token_solm(&self) -> WhisperTokenId { self.ctx.token_solm() } @@ -327,7 +308,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_token_prev(struct whisper_context * ctx)` - #[inline] pub fn token_prev(&self) -> WhisperTokenId { self.ctx.token_prev() } @@ -336,7 +316,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_token_nosp(struct whisper_context * ctx)` - #[inline] pub fn token_nosp(&self) -> WhisperTokenId { self.ctx.token_nosp() } @@ -345,7 +324,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_token_not (struct whisper_context * ctx)` - #[inline] pub fn token_not(&self) -> WhisperTokenId { self.ctx.token_not() } @@ -354,7 +332,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_token_beg (struct whisper_context * ctx)` - #[inline] pub fn token_beg(&self) -> WhisperTokenId { self.ctx.token_beg() } @@ -366,7 +343,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_token_lang(struct whisper_context * ctx, int lang_id)` - #[inline] pub fn token_lang(&self, lang_id: c_int) -> WhisperTokenId { self.ctx.token_lang(lang_id) } @@ -375,7 +351,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `void whisper_print_timings(struct whisper_context * ctx)` - #[inline] pub fn print_timings(&self) { self.ctx.print_timings() } @@ -384,7 +359,6 @@ impl WhisperContext { /// /// # C++ equivalent /// `void whisper_reset_timings(struct whisper_context * ctx)` - #[inline] pub fn reset_timings(&self) { self.ctx.reset_timings() } diff --git a/src/whisper_state.rs b/src/whisper_state.rs index 16c2fc5..5692675 100644 --- a/src/whisper_state.rs +++ b/src/whisper_state.rs @@ -252,7 +252,6 @@ impl WhisperState { /// /// # C++ equivalent /// `int whisper_n_len_from_state(struct whisper_context * ctx)` - #[inline] pub fn n_len(&self) -> Result { Ok(unsafe { whisper_rs_sys::whisper_n_len_from_state(self.ptr) }) } @@ -264,7 +263,6 @@ impl WhisperState { /// /// # C++ equivalent /// `int whisper_n_vocab (struct whisper_context * ctx)` - #[inline] pub fn n_vocab(&self) -> c_int { unsafe { whisper_rs_sys::whisper_n_vocab(self.ctx.ctx) } } @@ -317,7 +315,6 @@ impl WhisperState { /// /// # C++ equivalent /// `int whisper_full_n_segments(struct whisper_context * ctx)` - #[inline] pub fn full_n_segments(&self) -> c_int { unsafe { whisper_rs_sys::whisper_full_n_segments_from_state(self.ptr) } } @@ -326,7 +323,6 @@ impl WhisperState { /// /// # C++ equivalent /// `int whisper_full_lang_id_from_state(struct whisper_state * state);` - #[inline] pub fn full_lang_id_from_state(&self) -> c_int { unsafe { whisper_rs_sys::whisper_full_lang_id_from_state(self.ptr) } }