Skip to content

Commit e0c9e69

Browse files
Xaeroxeariscript
authored andcommitted
fix clippy warnings
1 parent fdcbc6c commit e0c9e69

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use thiserror::Error;
66
/// An error from the Minecraft networking protocol.
77
#[derive(Error, Debug)]
88
pub enum MinecraftProtocolError {
9-
/// VarInt data was invalid according to the spec.
9+
/// `VarInt` data was invalid according to the spec.
1010
#[error("invalid varint data")]
1111
InvalidVarInt,
1212

src/rcon/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub struct RconClient {
3636
}
3737

3838
impl RconClient {
39-
/// Construct an [RconClient] that connects to the given host and port.
39+
/// Construct an [`RconClient`] that connects to the given host and port.
4040
/// Note: to authenticate use the `authenticate` method, this method does not take a password.
4141
///
4242
/// # Arguments
@@ -61,7 +61,7 @@ impl RconClient {
6161

6262
/// Authenticate with the server, with the given password.
6363
///
64-
/// If authentication fails, this method will return [RconProtocolError::AuthFailed].
64+
/// If authentication fails, this method will return [`RconProtocolError::AuthFailed`].
6565
///
6666
/// # Arguments
6767
/// * `password` - A string slice that holds the RCON password.

src/status/data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub struct ChatComponentObject {
146146
pub extra: Option<Vec<ChatObject>>,
147147
}
148148

149-
/// ClickEvent data for a chat component
149+
/// `ClickEvent` data for a chat component
150150
#[derive(Debug, Serialize, Deserialize)]
151151
pub struct ChatClickEvent {
152152
// These are not renamed on purpose. (server returns them in snake_case)
@@ -169,7 +169,7 @@ pub struct ChatClickEvent {
169169
pub copy_to_clipboard: Option<String>,
170170
}
171171

172-
/// HoverEvent data for a chat component
172+
/// `HoverEvent` data for a chat component
173173
#[derive(Debug, Serialize, Deserialize)]
174174
pub struct ChatHoverEvent {
175175
// These are not renamed on purpose. (server returns them in snake_case)

src/varint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ mod tests {
107107
(i32::MIN, b"\x80\x80\x80\x80\x08"),
108108
]);
109109

110-
for (k, v) in cases.into_iter() {
110+
for (k, v) in cases {
111111
let varint: VarInt = k.into();
112112
assert_eq!(varint.bytes.len(), v.len());
113113
assert_eq!(varint.bytes, v);
@@ -140,7 +140,7 @@ mod tests {
140140
})
141141
.collect::<HashMap<_, _>>();
142142

143-
for (k, v) in cases.into_iter() {
143+
for (k, v) in cases {
144144
let x: Result<i32, _> = v.try_into();
145145

146146
if let Err(MinecraftProtocolError::InvalidVarInt) = x {

0 commit comments

Comments
 (0)