Skip to content

Commit ee43522

Browse files
authored
update to rust 1.84 (#1105)
1 parent bcf6fa1 commit ee43522

6 files changed

Lines changed: 27 additions & 27 deletions

File tree

cli/src/cli_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub struct NewCli<'a> {
104104
runner: CommandBuilder<'a>,
105105
}
106106

107-
impl<'a> Default for NewCli<'a> {
107+
impl Default for NewCli<'_> {
108108
fn default() -> Self {
109109
let mut parser = OxideCli::command().name("oxide").subcommand_required(true);
110110
let mut runner = CommandBuilder::default();

cli/src/cmd_timeseries/dashboard.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ struct TimeseriesGraph<'a> {
491491
graph_state: &'a GraphState,
492492
}
493493

494-
impl<'a> Widget for TimeseriesGraph<'a> {
494+
impl Widget for TimeseriesGraph<'_> {
495495
fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer)
496496
where
497497
Self: Sized,
@@ -549,7 +549,7 @@ struct TimeseriesSchemaTable<'a> {
549549
graph_state: &'a mut GraphState,
550550
}
551551

552-
impl<'a> Widget for TimeseriesSchemaTable<'a> {
552+
impl Widget for TimeseriesSchemaTable<'_> {
553553
fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer)
554554
where
555555
Self: Sized,
@@ -631,7 +631,7 @@ struct QueryString<'a> {
631631
query: &'a str,
632632
}
633633

634-
impl<'a> Widget for QueryString<'a> {
634+
impl Widget for QueryString<'_> {
635635
fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer)
636636
where
637637
Self: Sized,

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.82"
2+
channel = "1.84"
33
profile = "default"

sdk/src/auth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ fn get_profile_auth(
242242
(profile_info.host == env_host).then_some(profile_name)
243243
})
244244
.next()
245-
.ok_or_else(|| OxideAuthError::MissingToken(env_host))?
245+
.ok_or(OxideAuthError::MissingToken(env_host))?
246246
.clone()
247247
} else {
248248
let config_path = config_dir.join("config.toml");
@@ -263,7 +263,7 @@ fn get_profile_auth(
263263
let profile = creds
264264
.profile
265265
.get(&profile_name)
266-
.ok_or_else(|| OxideAuthError::NoProfile(credentials_path, profile_name))?;
266+
.ok_or(OxideAuthError::NoProfile(credentials_path, profile_name))?;
267267
Ok((profile.host.clone(), profile.token.clone()))
268268
}
269269
}

sdk/src/extras/disk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ pub mod types {
255255
pub cleanup_started: AtomicBool,
256256
}
257257

258-
impl<'a> DiskImport<'a> {
258+
impl DiskImport<'_> {
259259
pub async fn run_with_cancel(
260260
self,
261261
cancel_rx: oneshot::Receiver<()>,

test-common/src/json_mock.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@
77
//! A Facility to generate valid, random data for types that are
88
//! `schemars::JsonSchema + serde::Deserialize`. It generates a JSON value
99
//! based on the JSON schema and then deserializes that into the given type.
10+
//!
11+
//! Notes
12+
//! Configuration we might want
13+
//! - Should we use examples if they're present? Seems like might be a enum
14+
//! to select between "ignore examples", "exclusively use examples",
15+
//! "choose between generated values and examples (with some weight)",
16+
//! "choose examples for scalars (but not complex types)", etc.
17+
//! - One can imagine situations where it may not be tractable to know a priori
18+
//! if a value validates, for example if there were a structure that
19+
//! contained a complex regex or a `not` with a complex schema. The consumer
20+
//! might want to decide how many times we try to generate a type before
21+
//! giving up with an error.
22+
//! - Maximum array length.
23+
//!
24+
//! Do we need something to ensure that recursive types converge? For example,
25+
//! we could track the depth of an object (per-reference or in absolute terms)
26+
//! and bias towards simpler types as the depth increases (e.g. preferring to
27+
//! exclude non-required object properties or shortening arrays).
1028
1129
use std::fmt::Display;
1230

@@ -22,25 +40,6 @@ use schemars::{
2240
use serde::de::DeserializeOwned;
2341
use serde_json::{json, Number, Value};
2442

25-
/// Notes
26-
/// Configuration we might want
27-
/// - Should we use examples if they're present? Seems like might be a enum
28-
/// to select between "ignore examples", "exclusively use examples",
29-
/// "choose between generated values and examples (with some weight)",
30-
/// "choose examples for scalars (but not complex types)", etc.
31-
/// - One can imagine situations where it may not be tractable to know a priori
32-
/// if a value validates, for example if there were a structure that
33-
/// contained a complex regex or a `not` with a complex schema. The consumer
34-
/// might want to decide how many times we try to generate a type before
35-
/// giving up with an error.
36-
/// - Maximum array length.
37-
///
38-
///
39-
/// Do we need something to ensure that recursive types converge? For example,
40-
/// we could track the depth of an object (per-reference or in absolute terms)
41-
/// and bias towards simpler types as the depth increases (e.g. preferring to
42-
/// exclude non-required object properties or shortening arrays).
43-
4443
// TODO This is going to let us have a fixed set of bytes or an RNG.
4544
pub trait Source: Rng {}
4645
impl<T> Source for T where T: Rng {}
@@ -417,6 +416,7 @@ fn mock_bool(src: &mut impl Source) -> Result<Value, Error> {
417416
Ok(json! { b })
418417
}
419418

419+
#[allow(clippy::manual_div_ceil)]
420420
fn mock_integer(
421421
format: &Option<String>,
422422
number: &Option<Box<NumberValidation>>,

0 commit comments

Comments
 (0)