Skip to content

Commit ebab594

Browse files
clippy fix
Make clippy happy
1 parent 73f005f commit ebab594

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/hosts.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,12 @@ 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,
224+
Err(err) => Err(mysql::Error::IoError(std::io::Error::other(
226225
format!("Failed to execute query: {}", err),
227226
))),
228227
}
229228
}
230-
None => Err(mysql::Error::IoError(std::io::Error::new(
231-
std::io::ErrorKind::Other,
229+
None => Err(mysql::Error::IoError(std::io::Error::other(
232230
"Connection to Readyset host is not established",
233231
))),
234232
}
@@ -278,8 +276,7 @@ impl Host {
278276
pub fn cache_query(&mut self, query: &Query) -> Result<bool, mysql::Error> {
279277
match &mut self.conn {
280278
None => {
281-
return Err(mysql::Error::IoError(std::io::Error::new(
282-
std::io::ErrorKind::Other,
279+
return Err(mysql::Error::IoError(std::io::Error::other(
283280
"Connection to Readyset host is not established",
284281
)))
285282
}

0 commit comments

Comments
 (0)