Fix clippy warnings in cli module
This commit is contained in:
+5
-4
@@ -64,7 +64,7 @@
|
|||||||
//! starting the server. You can also use the `--bind` argument to specify the address to bind the
|
//! starting the server. You can also use the `--bind` argument to specify the address to bind the
|
||||||
//! server to, which defaults to `0.0.0.0:3000`.
|
//! server to, which defaults to `0.0.0.0:3000`.
|
||||||
|
|
||||||
use std::{net::SocketAddr, str::FromStr};
|
use std::{fmt, net::SocketAddr, str::FromStr};
|
||||||
|
|
||||||
use twilight_gateway::ShardId;
|
use twilight_gateway::ShardId;
|
||||||
|
|
||||||
@@ -163,12 +163,13 @@ impl FromStr for Shard {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ToString for Shard {
|
impl fmt::Display for Shard {
|
||||||
fn to_string(&self) -> String {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
format!("{}:{}", self.id, self.total)
|
write!(f, "{}:{}", self.id, self.total)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::from_over_into)]
|
||||||
impl Into<ShardId> for Shard {
|
impl Into<ShardId> for Shard {
|
||||||
fn into(self) -> ShardId {
|
fn into(self) -> ShardId {
|
||||||
ShardId::new(self.id, self.total)
|
ShardId::new(self.id, self.total)
|
||||||
|
|||||||
Reference in New Issue
Block a user