chore: Upgrade to Rust 1.78.0 (#24953)

This fixes new lints that have come up in the latest edition of clippy and moves
.cargo/config to .cargo/config.toml as the previous filename is now deprecated.
pull/24954/head
Michael Gattozzi 2024-05-02 13:39:20 -04:00 committed by GitHub
parent 43368981c7
commit 7138019636
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 7 additions and 8 deletions

View File

@ -890,8 +890,6 @@ pub(crate) async fn route_request<W: WriteBuffer, Q: QueryExecutor, T: TimeProvi
mut req: Request<Body>,
) -> Result<Response<Body>, Infallible>
where
W: WriteBuffer,
Q: QueryExecutor,
Error: From<<Q as QueryExecutor>::Error>,
{
if let Err(e) = http_server.authorize_request(&mut req).await {

View File

@ -378,7 +378,7 @@ impl QueryResponseStream {
let mut columns = vec!["".to_string(); self.column_map.len()];
self.column_map
.iter()
.for_each(|(k, i)| columns[*i] = k.to_owned());
.for_each(|(k, i)| k.clone_into(&mut columns[*i]));
columns
}

View File

@ -186,7 +186,7 @@ impl InnerCatalog {
#[cfg(test)]
pub fn db_exists(&self, db_name: &str) -> bool {
self.databases.get(db_name).is_some()
self.databases.contains_key(db_name)
}
}

View File

@ -1,6 +1,7 @@
use crate::SegmentId;
use chrono::prelude::*;
use object_store::path::Path as ObjPath;
use std::fmt;
use std::ops::Deref;
use std::path::Path;
use std::path::PathBuf;
@ -109,9 +110,9 @@ impl SegmentWalFilePath {
}
}
impl ToString for SegmentWalFilePath {
fn to_string(&self) -> String {
self.0.to_string_lossy().into_owned()
impl fmt::Display for SegmentWalFilePath {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
write!(f, "{}", self.0.to_string_lossy())
}
}

View File

@ -1,3 +1,3 @@
[toolchain]
channel = "1.77.0"
channel = "1.78.0"
components = ["rustfmt", "clippy", "rust-analyzer"]