Fix: Conditional compiling errors and warnings
This commit is contained in:
parent
4921487b33
commit
859f3be213
|
@ -16,6 +16,7 @@ use crate::types::{
|
|||
};
|
||||
|
||||
impl Message {
|
||||
#[allow(clippy::useless_conversion)]
|
||||
/// Sends a message in the channel with the provided channel_id.
|
||||
/// Returns the sent message.
|
||||
///
|
||||
|
|
|
@ -101,8 +101,7 @@ This crate uses Semantic Versioning 2.0.0 as its versioning scheme. You can read
|
|||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion
|
||||
clippy::new_without_default
|
||||
)]
|
||||
#![warn(
|
||||
clippy::todo,
|
||||
|
@ -111,7 +110,8 @@ This crate uses Semantic Versioning 2.0.0 as its versioning scheme. You can read
|
|||
clippy::print_stdout,
|
||||
clippy::print_stderr,
|
||||
missing_debug_implementations,
|
||||
missing_copy_implementations
|
||||
missing_copy_implementations,
|
||||
clippy::useless_conversion
|
||||
)]
|
||||
#[cfg(all(feature = "rt", feature = "rt_multi_thread"))]
|
||||
compile_error!("feature \"rt\" and feature \"rt_multi_thread\" cannot be enabled at the same time");
|
||||
|
|
|
@ -83,6 +83,7 @@ pub struct AutoModerationRuleTriggerMetadataForKeywordPreset {
|
|||
pub allow_list: Vec<String>,
|
||||
}
|
||||
|
||||
#[allow(missing_copy_implementations)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, Eq, PartialOrd, Ord)]
|
||||
/// See <https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata>
|
||||
pub struct AutoModerationRuleTriggerMetadataForMentionSpam {
|
||||
|
|
|
@ -25,7 +25,8 @@ impl Default for SecurityKey {
|
|||
user_id: String::new(),
|
||||
key_id: String::new(),
|
||||
public_key: String::new(),
|
||||
counter: 0.into(),
|
||||
#[allow(clippy::useless_conversion)]
|
||||
counter: 0u64.into(),
|
||||
name: String::new(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,8 @@ pub struct UserSettings {
|
|||
impl Default for UserSettings {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
afk_timeout: Some(3600.into()),
|
||||
#[allow(clippy::useless_conversion)]
|
||||
afk_timeout: Some(3600u16.into()),
|
||||
allow_accessibility_detection: true,
|
||||
animate_emoji: true,
|
||||
#[cfg(not(feature = "sqlx"))]
|
||||
|
|
Loading…
Reference in New Issue