Skip to content

Commit

Permalink
Remove some unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
novacrazy committed Sep 6, 2024
1 parent e15cc0a commit dc68a76
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/models/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::*;
//use super::*;

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
Expand Down
1 change: 1 addition & 0 deletions src/models/gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ pub mod message {
#[cfg(feature = "framework")]
use futures::future::{BoxFuture, Future};

#[allow(unused_imports)]
use crate::models::{
aliases::*,
commands::{Identify, SetPresence},
Expand Down
2 changes: 1 addition & 1 deletion src/models/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const _: () = {
Ok(match s.as_bytes()[0] {
b':' => EmoteOrEmoji::Emote { emote: s[1..].parse()? },
_ => EmoteOrEmoji::Emoji {
emoji: percent_encoding::percent_decode_str(s).decode_utf8_lossy().into(),
emoji: percent_decode_str(s).decode_utf8_lossy().into(),
},
})
}
Expand Down
5 changes: 3 additions & 2 deletions src/models/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Object data structures used within Lantern
#![allow(unused_imports, clippy::identity_op)]
#![deny(unused_imports)]
//#![cfg_attr(debug_assertions, warn(missing_docs))]

#[cfg(feature = "rkyv")]
Expand Down Expand Up @@ -128,8 +129,8 @@ type Hasher = std::collections::hash_map::RandomState;
type Hasher = ahash::RandomState;

pub use self::{
asset::*, auth::*, config::*, embed::*, embed::*, emote::*, file::*, gateway::*, invite::*, message::*, party::*,
permission::*, presence::*, role::*, room::*, session::*, sf::*, stats::*, thread::*, user::*,
asset::*, auth::*, config::*, embed::*, emote::*, file::*, gateway::*, invite::*, message::*, party::*, permission::*,
presence::*, role::*, room::*, session::*, sf::*, stats::*, thread::*, user::*,
};

/// Directional search query
Expand Down
4 changes: 2 additions & 2 deletions src/models/nullable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl<T> Nullable<T> {
}

mod impl_serde {
use serde::de::{Deserialize, Deserializer, Visitor};
use serde::de::{Deserialize, Deserializer};
use serde::ser::{Serialize, Serializer};

use super::Nullable;
Expand Down Expand Up @@ -242,7 +242,7 @@ mod schema_impl {

#[cfg(feature = "rkyv")]
mod rkyv_impl {
use core::{marker::PhantomData, mem::MaybeUninit};
use core::marker::PhantomData;

use super::*;

Expand Down
3 changes: 0 additions & 3 deletions src/models/party/prefs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
use core::fmt;
use std::collections::HashMap;

use super::*;

use crate::models::Locale;
Expand Down
2 changes: 0 additions & 2 deletions src/models/permission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ pub struct Overwrite {
pub deny: Permissions,
}

use core::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Not};

impl Overwrite {
/// Takes the Union of two overwrites, assuming the same ID.
///
Expand Down
2 changes: 0 additions & 2 deletions src/models/sf.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use super::*;

use time::{OffsetDateTime, PrimitiveDateTime};

/// Arbitrarily chosen starting epoch to offset the clock by
Expand Down
3 changes: 0 additions & 3 deletions src/models/user/prefs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
use core::fmt;
use std::collections::HashMap;

use super::*;

enum_codes! {
Expand Down

0 comments on commit dc68a76

Please sign in to comment.