From d90ec90ee1237e98c688afd51ebdce5368f0e4ea Mon Sep 17 00:00:00 2001 From: Rain Date: Tue, 28 Jul 2026 14:18:11 -0700 Subject: [PATCH] [spr] initial version Created using spr 1.3.6-beta.1 --- Cargo.toml | 2 +- daft-derive/src/internals/imp.rs | 22 +++++++--------------- daft-derive/tests/snapshot_test.rs | 2 +- daft/src/core_impls.rs | 6 +++--- rustfmt.toml | 2 +- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b9db269..28e9899 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ ] [workspace.package] -edition = "2021" +edition = "2024" repository = "https://github.com/oxidecomputer/daft" rust-version = "1.85.0" license = "MIT OR Apache-2.0" diff --git a/daft-derive/src/internals/imp.rs b/daft-derive/src/internals/imp.rs index dddf87e..357b633 100644 --- a/daft-derive/src/internals/imp.rs +++ b/daft-derive/src/internals/imp.rs @@ -1,11 +1,11 @@ use super::error_store::{ErrorSink, ErrorStore}; use proc_macro2::{Span, TokenStream}; -use quote::{quote, quote_spanned, ToTokens}; +use quote::{ToTokens, quote, quote_spanned}; use syn::{ - parse_quote, parse_quote_spanned, parse_str, spanned::Spanned, - visit::Visit, Attribute, Data, DataStruct, DeriveInput, Expr, Field, - Fields, GenericParam, Generics, Index, Lifetime, LifetimeParam, Path, - Token, WhereClause, WherePredicate, + Attribute, Data, DataStruct, DeriveInput, Expr, Field, Fields, + GenericParam, Generics, Index, Lifetime, LifetimeParam, Path, Token, + WhereClause, WherePredicate, parse_quote, parse_quote_spanned, parse_str, + spanned::Spanned, visit::Visit, }; pub struct DeriveDiffableOutput { @@ -740,11 +740,7 @@ impl StructConfig { } } - if errors.has_critical_errors() { - None - } else { - Some(Self { mode }) - } + if errors.has_critical_errors() { None } else { Some(Self { mode }) } } } @@ -823,11 +819,7 @@ impl FieldConfig { } } - if errors.has_critical_errors() { - None - } else { - Some(Self { mode }) - } + if errors.has_critical_errors() { None } else { Some(Self { mode }) } } } diff --git a/daft-derive/tests/snapshot_test.rs b/daft-derive/tests/snapshot_test.rs index 0453514..ff192e1 100644 --- a/daft-derive/tests/snapshot_test.rs +++ b/daft-derive/tests/snapshot_test.rs @@ -1,6 +1,6 @@ use datatest_stable::Utf8Path; use quote::ToTokens; -use syn::{parse_quote, DeriveInput}; +use syn::{DeriveInput, parse_quote}; // We need access to the proc-macro's internals for this test. An alternative // would be to make this a unit test, but the integration test harness gives us diff --git a/daft/src/core_impls.rs b/daft/src/core_impls.rs index 65bbad9..809f5ac 100644 --- a/daft/src/core_impls.rs +++ b/daft/src/core_impls.rs @@ -6,9 +6,9 @@ use core::{ marker::PhantomData, net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6}, num::{ - NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, - NonZeroIsize, NonZeroU128, NonZeroU16, NonZeroU32, NonZeroU64, - NonZeroU8, NonZeroUsize, + NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI128, + NonZeroIsize, NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, + NonZeroU128, NonZeroUsize, }, }; diff --git a/rustfmt.toml b/rustfmt.toml index 41d1d58..5981657 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -3,4 +3,4 @@ # --------------------------------------------------------------------------- max_width = 80 use_small_heuristics = "max" -edition = "2021" +edition = "2024"