Skip to content

Commit 0c02a8f

Browse files
clippy fix
Make clippy happy
1 parent 73f005f commit 0c02a8f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/hosts.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,13 @@ impl Host {
221221
self.readyset_status = ReadysetStatus::Unknown;
222222
Ok(ProxyStatus::Shunned)
223223
}
224-
Err(err) => Err(mysql::Error::IoError(std::io::Error::new(
225-
std::io::ErrorKind::Other,
226-
format!("Failed to execute query: {}", err),
227-
))),
224+
Err(err) => Err(mysql::Error::IoError(std::io::Error::other(format!(
225+
"Failed to execute query: {}",
226+
err
227+
)))),
228228
}
229229
}
230-
None => Err(mysql::Error::IoError(std::io::Error::new(
231-
std::io::ErrorKind::Other,
230+
None => Err(mysql::Error::IoError(std::io::Error::other(
232231
"Connection to Readyset host is not established",
233232
))),
234233
}
@@ -278,8 +277,7 @@ impl Host {
278277
pub fn cache_query(&mut self, query: &Query) -> Result<bool, mysql::Error> {
279278
match &mut self.conn {
280279
None => {
281-
return Err(mysql::Error::IoError(std::io::Error::new(
282-
std::io::ErrorKind::Other,
280+
return Err(mysql::Error::IoError(std::io::Error::other(
283281
"Connection to Readyset host is not established",
284282
)))
285283
}

0 commit comments

Comments
 (0)