Skip to content

Commit c5ed113

Browse files
authored
chore: Update rust toolchain to 1.87.0 (#26456)
Changes were due to a number of clippy improvements
1 parent 1abbb52 commit c5ed113

File tree

6 files changed

+11
-20
lines changed

6 files changed

+11
-20
lines changed

influxdb3_catalog/src/catalog.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ impl Catalog {
437437
// NOTE: this could be id-based in future
438438
pub fn active_triggers(&self) -> Vec<(Arc<str>, Arc<str>)> {
439439
let inner = self.inner.read();
440-
let result = inner
440+
inner
441441
.databases
442442
.resource_iter()
443443
.flat_map(|db| {
@@ -451,8 +451,7 @@ impl Catalog {
451451
}
452452
})
453453
})
454-
.collect();
455-
result
454+
.collect()
456455
}
457456

458457
pub fn get_tokens(&self) -> Vec<Arc<TokenInfo>> {

influxdb3_load_generator/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ fn get_runtime(num_threads: Option<usize>) -> Result<Runtime, std::io::Error> {
120120
// requires a running tokio runtime and is initialised after this function.
121121

122122
use tokio::runtime::Builder;
123-
let kind = std::io::ErrorKind::Other;
124123
match num_threads {
125124
None => Runtime::new(),
126125
Some(num_threads) => {
@@ -131,7 +130,7 @@ fn get_runtime(num_threads: Option<usize>) -> Result<Runtime, std::io::Error> {
131130
0 => {
132131
let msg =
133132
format!("Invalid num-threads: '{num_threads}' must be greater than zero");
134-
Err(std::io::Error::new(kind, msg))
133+
Err(std::io::Error::other(msg))
135134
}
136135
1 => Builder::new_current_thread().enable_all().build(),
137136
_ => Builder::new_multi_thread()

influxdb3_processing_engine/src/plugins.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ mod python_plugin {
718718
}
719719

720720
enum Schedule {
721-
Cron(OwnedScheduleIterator<Utc>),
721+
Cron(Box<OwnedScheduleIterator<Utc>>),
722722
Every(Duration),
723723
}
724724

@@ -767,7 +767,7 @@ mod python_plugin {
767767
}
768768
}
769769
fn new_cron(cron_schedule: CronSchedule, time_provider: Arc<dyn TimeProvider>) -> Self {
770-
let mut schedule = cron_schedule.after_owned(time_provider.now().date_time());
770+
let mut schedule = Box::new(cron_schedule.after_owned(time_provider.now().date_time()));
771771
let next_trigger_time = schedule.next();
772772
Self {
773773
schedule: Schedule::Cron(schedule),

influxdb3_server/src/http.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,10 +1385,8 @@ fn json_content_type(headers: &HeaderMap) -> bool {
13851385
return false;
13861386
};
13871387

1388-
let is_json_content_type = mime.type_() == "application"
1389-
&& (mime.subtype() == "json" || mime.suffix().is_some_and(|name| name == "json"));
1390-
1391-
is_json_content_type
1388+
mime.type_() == "application"
1389+
&& (mime.subtype() == "json" || mime.suffix().is_some_and(|name| name == "json"))
13921390
}
13931391

13941392
#[derive(Debug, Deserialize)]
@@ -1784,11 +1782,7 @@ pub(crate) async fn route_request(
17841782
let path = uri.path();
17851783
// admin token creation should be allowed without authentication
17861784
// and any endpoints that are disabled
1787-
if path == all_paths::API_V3_CONFIGURE_ADMIN_TOKEN
1788-
|| paths_without_authz
1789-
.iter()
1790-
.any(|disabled_authz_path| *disabled_authz_path == path)
1791-
{
1785+
if path == all_paths::API_V3_CONFIGURE_ADMIN_TOKEN || paths_without_authz.contains(&path) {
17921786
trace!(?uri, "not authenticating request");
17931787
} else {
17941788
trace!(?uri, "authenticating request");

influxdb3_write/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,13 @@ impl PersistedSnapshot {
247247
}
248248

249249
pub fn overall_db_table_file_counts(host_snapshots: &[PersistedSnapshot]) -> (u64, u64, u64) {
250-
let overall_counts = host_snapshots.iter().fold((0, 0, 0), |mut acc, item| {
250+
host_snapshots.iter().fold((0, 0, 0), |mut acc, item| {
251251
let (db_count, table_count, file_count) = item.db_table_and_file_count();
252252
acc.0 += db_count;
253253
acc.1 += table_count;
254254
acc.2 += file_count;
255255
acc
256-
});
257-
overall_counts
256+
})
258257
}
259258
}
260259

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.86.0"
2+
channel = "1.87.0"
33
components = ["rustfmt", "clippy", "rust-analyzer", "rust-src"]

0 commit comments

Comments
 (0)