Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to edition 2024 #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = [
"strong-type-derive",
"strong-type-tests"
]
resolver = "2"
resolver = "3"

[patch.crates-io]
strong-type = { path = "strong-type" }
4 changes: 2 additions & 2 deletions strong-type-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "strong-type-derive"
description = "Macro implemenation for #[derive(StrongType)]"
version = "0.12.2"
edition = "2021"
version = "0.12.3"
edition = "2024"

license = "MIT OR Apache-2.0"
keywords = ["primitive", "string", "strongly-typed"]
Expand Down
4 changes: 2 additions & 2 deletions strong-type-derive/src/detail/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ pub(crate) use hash::implement_hash;
pub(crate) use nan::implement_nan;
pub(crate) use negate::implement_negate;
pub(crate) use scalable::implement_scalable;
pub(crate) use underlying_type_utils::{get_type, TypeInfo, UnderlyingType, ValueTypeGroup};
pub(crate) use utils::{get_attributes, validate_struct, StrongTypeAttributes};
pub(crate) use underlying_type_utils::{TypeInfo, UnderlyingType, ValueTypeGroup, get_type};
pub(crate) use utils::{StrongTypeAttributes, get_attributes, validate_struct};
2 changes: 1 addition & 1 deletion strong-type-derive/src/detail/underlying_type_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub(crate) fn get_type_group(

fn get_type_ident(input: &DeriveInput) -> Option<syn::Ident> {
if let Data::Struct(ref data_struct) = input.data {
if let Type::Path(ref path) = &data_struct.fields.iter().next().unwrap().ty {
if let Type::Path(path) = &data_struct.fields.iter().next().unwrap().ty {
return Some(path.path.segments.last().unwrap().ident.clone());
}
}
Expand Down
2 changes: 1 addition & 1 deletion strong-type-derive/src/detail/utils.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::detail::underlying_type_utils::get_type_group;
use crate::detail::{get_type, TypeInfo, UnderlyingType};
use crate::detail::{TypeInfo, UnderlyingType, get_type};
use syn::{Data, DeriveInput, Fields};

pub(crate) struct StrongTypeAttributes {
Expand Down
2 changes: 1 addition & 1 deletion strong-type-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod detail;
mod strong_type;

use proc_macro::TokenStream;
use syn::{parse_macro_input, DeriveInput};
use syn::{DeriveInput, parse_macro_input};

use crate::strong_type::expand_strong_type;

Expand Down
12 changes: 6 additions & 6 deletions strong-type-derive/src/strong_type.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::detail::{
get_attributes, implement_addable, implement_arithmetic, implement_basic,
implement_basic_primitive, implement_basic_string, implement_bit_shift, implement_bool_ops,
implement_constants, implement_constants_derived, implement_conversion, implement_display,
implement_hash, implement_infinity, implement_limit, implement_nan, implement_negate,
StrongTypeAttributes, TypeInfo, UnderlyingType, ValueTypeGroup, get_attributes,
implement_addable, implement_arithmetic, implement_basic, implement_basic_primitive,
implement_basic_string, implement_bit_shift, implement_bool_ops, implement_constants,
implement_constants_derived, implement_conversion, implement_display, implement_hash,
implement_infinity, implement_limit, implement_nan, implement_negate,
implement_primitive_accessor, implement_primitive_accessor_derived,
implement_primitive_str_accessor, implement_primitive_str_accessor_derived, implement_scalable,
implement_str_conversion, validate_struct, StrongTypeAttributes, TypeInfo, UnderlyingType,
ValueTypeGroup,
implement_str_conversion, validate_struct,
};
use proc_macro2::TokenStream;
use quote::quote;
Expand Down
2 changes: 1 addition & 1 deletion strong-type-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "strong-type-tests"
version = "0.0.0"
edition = "2021"
edition = "2024"
publish = false

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions strong-type/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "strong-type"
description = "Procedural macros for naming and strong-typing pritimives and strings"
version = "0.12.2"
edition = "2021"
version = "0.12.3"
edition = "2024"

license = "MIT OR Apache-2.0"
keywords = ["primitive", "string", "strongly-typed"]
Expand Down
Loading