Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit c2ca598

Browse files
committed
Remove inline arguments
1 parent abad8ed commit c2ca598

File tree

13 files changed

+0
-51
lines changed

13 files changed

+0
-51
lines changed

scripty_audio_handler/src/error.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ impl Error {
5454
}
5555

5656
impl From<JoinError> for Error {
57-
#[inline]
5857
fn from(e: JoinError) -> Self {
5958
Self {
6059
kind: ErrorKind::Join(e),
@@ -64,7 +63,6 @@ impl From<JoinError> for Error {
6463
}
6564

6665
impl From<sqlx::Error> for Error {
67-
#[inline]
6866
fn from(e: sqlx::Error) -> Self {
6967
Self {
7068
kind: ErrorKind::Database(e),
@@ -74,7 +72,6 @@ impl From<sqlx::Error> for Error {
7472
}
7573

7674
impl From<serenity::Error> for Error {
77-
#[inline]
7875
fn from(e: serenity::Error) -> Self {
7976
Self {
8077
kind: ErrorKind::Serenity(e),
@@ -84,7 +81,6 @@ impl From<serenity::Error> for Error {
8481
}
8582

8683
impl From<scripty_redis::TransactionError> for Error {
87-
#[inline]
8884
fn from(e: scripty_redis::TransactionError) -> Self {
8985
Self {
9086
kind: ErrorKind::Redis(e),

scripty_bot_utils/src/entity_block.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ pub async fn add_blocked_guild(guild_id: GuildId, reason: Option<String>) -> Res
190190
Ok(())
191191
}
192192

193-
#[inline]
194193
pub fn check_block(ctx: poise::Context<'_, Data, Error>) -> BoxFuture<Result<bool, Error>> {
195194
Box::pin(_check_block(ctx))
196195
}

scripty_bot_utils/src/error/error_type.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -55,47 +55,41 @@ pub enum ErrorEnum {
5555

5656
#[allow(dead_code)]
5757
impl Error {
58-
#[inline]
5958
pub fn serenity(err: serenity::Error) -> Self {
6059
Error {
6160
bt: Backtrace::new_unresolved(),
6261
err: ErrorEnum::Serenity(err),
6362
}
6463
}
6564

66-
#[inline]
6765
pub fn invalid_channel_type(expected: Vec<ChannelType>, got: ChannelType) -> Self {
6866
Error {
6967
bt: Backtrace::new_unresolved(),
7068
err: ErrorEnum::InvalidChannelType { expected, got },
7169
}
7270
}
7371

74-
#[inline]
7572
pub fn db(err: sqlx::Error) -> Self {
7673
Error {
7774
bt: Backtrace::new_unresolved(),
7875
err: ErrorEnum::Db(err),
7976
}
8077
}
8178

82-
#[inline]
8379
pub fn expected_guild() -> Self {
8480
Error {
8581
bt: Backtrace::new_unresolved(),
8682
err: ErrorEnum::ExpectedGuild,
8783
}
8884
}
8985

90-
#[inline]
9186
pub fn expected_channel() -> Self {
9287
Error {
9388
bt: Backtrace::new_unresolved(),
9489
err: ErrorEnum::ExpectedChannel,
9590
}
9691
}
9792

98-
#[inline]
9993
pub fn join(err: scripty_audio_handler::JoinError) -> Self {
10094
Error {
10195
bt: Backtrace::new_unresolved(),
@@ -117,95 +111,83 @@ impl Error {
117111
}
118112
}
119113

120-
#[inline]
121114
pub fn manual() -> Self {
122115
Error {
123116
bt: Backtrace::new_unresolved(),
124117
err: ErrorEnum::ManualError,
125118
}
126119
}
127120

128-
#[inline]
129121
pub fn redis(err: scripty_redis::redis::RedisError) -> Self {
130122
Error {
131123
bt: Backtrace::new_unresolved(),
132124
err: ErrorEnum::Redis(err),
133125
}
134126
}
135127

136-
#[inline]
137128
pub fn redis_pool(err: scripty_redis::PoolError) -> Self {
138129
Error {
139130
bt: Backtrace::new_unresolved(),
140131
err: ErrorEnum::RedisPool(err),
141132
}
142133
}
143134

144-
#[inline]
145135
pub fn voice_message_decode(err: OpusSourceError) -> Self {
146136
Error {
147137
bt: Backtrace::new_unresolved(),
148138
err: ErrorEnum::VoiceMessageDecode(err),
149139
}
150140
}
151141

152-
#[inline]
153142
pub fn transcription(err: ModelError) -> Self {
154143
Error {
155144
bt: Backtrace::new_unresolved(),
156145
err: ErrorEnum::Transcription(err),
157146
}
158147
}
159148

160-
#[inline]
161149
pub fn expected_premium_value() -> Self {
162150
Error {
163151
bt: Backtrace::new_unresolved(),
164152
err: ErrorEnum::ExpectedPremiumValue,
165153
}
166154
}
167155

168-
#[inline]
169156
pub fn audio_transcription(err: FileTranscriptError) -> Self {
170157
Error {
171158
bt: Backtrace::new_unresolved(),
172159
err: ErrorEnum::AudioTranscription(err),
173160
}
174161
}
175162

176-
#[inline]
177163
pub fn custom(err: String) -> Self {
178164
Error {
179165
bt: Backtrace::new_unresolved(),
180166
err: ErrorEnum::Custom(err),
181167
}
182168
}
183169

184-
#[inline]
185170
pub fn call_already_exists() -> Self {
186171
Error {
187172
bt: Backtrace::new_unresolved(),
188173
err: ErrorEnum::CallAlreadyExists,
189174
}
190175
}
191176

192-
#[inline]
193177
pub fn no_guild_defaults() -> Self {
194178
Error {
195179
bt: Backtrace::new_unresolved(),
196180
err: ErrorEnum::NoGuildDefaults,
197181
}
198182
}
199183

200-
#[inline]
201184
pub fn background_task(err: tokio::task::JoinError) -> Self {
202185
Error {
203186
bt: Backtrace::new_unresolved(),
204187
err: ErrorEnum::BackgroundTaskFailure(err),
205188
}
206189
}
207190

208-
#[inline]
209191
pub fn backtrace(&mut self) -> &Backtrace {
210192
self.bt.resolve();
211193
&self.bt
@@ -322,7 +304,6 @@ impl StdError for Error {
322304
}
323305

324306
impl From<serenity::Error> for Error {
325-
#[inline]
326307
fn from(e: serenity::Error) -> Self {
327308
Self {
328309
err: ErrorEnum::Serenity(e),
@@ -332,7 +313,6 @@ impl From<serenity::Error> for Error {
332313
}
333314

334315
impl From<sqlx::Error> for Error {
335-
#[inline]
336316
fn from(e: sqlx::Error) -> Self {
337317
Self {
338318
err: ErrorEnum::Db(e),
@@ -342,7 +322,6 @@ impl From<sqlx::Error> for Error {
342322
}
343323

344324
impl From<scripty_audio_handler::Error> for Error {
345-
#[inline]
346325
fn from(
347326
scripty_audio_handler::Error { kind, backtrace }: scripty_audio_handler::Error,
348327
) -> Self {
@@ -368,7 +347,6 @@ impl From<scripty_audio_handler::Error> for Error {
368347
}
369348

370349
impl From<scripty_audio_handler::JoinError> for Error {
371-
#[inline]
372350
fn from(e: scripty_audio_handler::JoinError) -> Self {
373351
Self {
374352
err: ErrorEnum::Join(e),
@@ -396,7 +374,6 @@ impl From<ToStrError> for Error {
396374
}
397375

398376
impl From<scripty_redis::redis::RedisError> for Error {
399-
#[inline]
400377
fn from(e: scripty_redis::redis::RedisError) -> Self {
401378
Self {
402379
err: ErrorEnum::Redis(e),
@@ -406,7 +383,6 @@ impl From<scripty_redis::redis::RedisError> for Error {
406383
}
407384

408385
impl From<scripty_redis::PoolError> for Error {
409-
#[inline]
410386
fn from(e: scripty_redis::PoolError) -> Self {
411387
Self {
412388
err: ErrorEnum::RedisPool(e),
@@ -416,7 +392,6 @@ impl From<scripty_redis::PoolError> for Error {
416392
}
417393

418394
impl From<String> for Error {
419-
#[inline]
420395
fn from(e: String) -> Self {
421396
Self {
422397
err: ErrorEnum::Custom(e),
@@ -426,7 +401,6 @@ impl From<String> for Error {
426401
}
427402

428403
impl From<OpusSourceError> for Error {
429-
#[inline]
430404
fn from(e: OpusSourceError) -> Self {
431405
Self {
432406
err: ErrorEnum::VoiceMessageDecode(e),
@@ -436,7 +410,6 @@ impl From<OpusSourceError> for Error {
436410
}
437411

438412
impl From<ModelError> for Error {
439-
#[inline]
440413
fn from(e: ModelError) -> Self {
441414
Self {
442415
err: ErrorEnum::Transcription(e),
@@ -446,7 +419,6 @@ impl From<ModelError> for Error {
446419
}
447420

448421
impl From<FileTranscriptError> for Error {
449-
#[inline]
450422
fn from(e: FileTranscriptError) -> Self {
451423
Self {
452424
err: ErrorEnum::AudioTranscription(e),
@@ -456,7 +428,6 @@ impl From<FileTranscriptError> for Error {
456428
}
457429

458430
impl From<scripty_redis::TransactionError> for Error {
459-
#[inline]
460431
fn from(e: scripty_redis::TransactionError) -> Self {
461432
match e {
462433
scripty_redis::TransactionError::Deadpool(e) => Self::from(e),

scripty_bot_utils/src/error/handler.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,6 @@ async fn _on_error(error: FrameworkError<'_, Data, Error>) {
454454
}
455455
}
456456

457-
#[inline]
458457
pub fn on_error(error: FrameworkError<'_, Data, Error>) -> BoxFuture<'_, ()> {
459458
Box::pin(_on_error(error))
460459
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use serenity::gateway::client::Context;
22

3-
#[inline]
43
pub async fn resume(_: &Context) {
54
info!("successfully resumed");
65
}

scripty_bot_utils/src/handler/post_command.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ async fn _post_command(_: crate::Context<'_>) {
44
// now unused
55
}
66

7-
#[inline]
87
pub fn post_command(ctx: crate::Context<'_>) -> BoxFuture<()> {
98
Box::pin(_post_command(ctx))
109
}

scripty_bot_utils/src/handler/pre_command.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ async fn _pre_command(ctx: Context<'_>) {
3232
ctx.set_invocation_data(invocation_data).await;
3333
}
3434

35-
#[inline]
3635
pub fn pre_command(ctx: Context) -> BoxFuture<()> {
3736
debug!("pre_command");
3837
Box::pin(_pre_command(ctx))

scripty_bot_utils/src/types/lang.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,16 @@ impl ArgumentConvert for Language {
2828
}
2929

3030
impl Default for Language {
31-
#[inline]
3231
fn default() -> Self {
3332
Self("en".to_owned())
3433
}
3534
}
3635

3736
impl Language {
38-
#[inline]
3937
pub fn new_unchecked(s: String) -> Self {
4038
Self(s)
4139
}
4240

43-
#[inline]
4441
#[allow(dead_code)]
4542
pub fn new(s: String) -> Option<Self> {
4643
if scripty_audio_handler::check_model_language(&s) {
@@ -50,21 +47,18 @@ impl Language {
5047
}
5148
}
5249

53-
#[inline]
5450
pub fn into_inner(self) -> String {
5551
self.0
5652
}
5753
}
5854

5955
impl Display for Language {
60-
#[inline]
6156
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
6257
f.write_str(self.0.as_str())
6358
}
6459
}
6560

6661
impl From<Language> for sqlx::types::JsonValue {
67-
#[inline]
6862
fn from(language: Language) -> Self {
6963
Self::String(language.0)
7064
}
@@ -77,7 +71,6 @@ impl From<Language> for sqlx::types::JsonValue {
7771
pub struct LanguageInvalid(String);
7872

7973
impl Display for LanguageInvalid {
80-
#[inline]
8174
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
8275
f.write_str(format!(r#"language "{}" is invalid"#, self.0).as_str())
8376
}

scripty_data_storage/src/crypto.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use rand::RngCore;
77
static CRYPTO_CIPHER: OnceCell<Aes256Gcm> = OnceCell::new();
88

99
/// Generate a random 96 bit nonce.
10-
#[inline]
1110
#[must_use]
1211
pub fn generate_nonce() -> [u8; 12] {
1312
let mut nonce = [0u8; 12];

scripty_metrics/src/cmd_latency.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ pub fn measure_end_latency(id: u64) {
4242

4343
/// Call this function roughly every two minutes.
4444
/// This will clear all stored start times, to free up memory.
45-
#[inline]
4645
pub fn clear_latency_start_times() {
4746
LATENCY_START_TIME.get_or_init(DashMap::new).clear();
4847
}

0 commit comments

Comments
 (0)