Skip to content
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 @@ -13,7 +13,7 @@ keywords = ["json_schema", "serde", "validation"]

[workspace.dependencies]
itertools = "^0.14.0"
paste = "^1.0"
pastey = "^0.2.1"
proc-macro-error2 = { version = "^2.0", default-features = false }
proc-macro2 = "^1.0"
quote = "^1.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/serde_valid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ indexmap = { version = "^2.0", features = ["serde"] }
itertools.workspace = true
num-traits = "^0.2"
once_cell = "^1.7"
paste.workspace = true
pastey.workspace = true
regex.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions crates/serde_valid/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ macro_rules! impl_composited_validation_1args {
) -> Result<(), Composited<$Error:ty>>;
}
) => {
paste::paste! {
pastey::paste! {
pub trait $ValidateCompositedTrait {
fn $validate_composited_method(
&self,
Expand Down Expand Up @@ -149,7 +149,7 @@ macro_rules! impl_composited_validation_1args {
) -> Result<(), Composited<$Error>>;
}
);
paste::paste! {
pastey::paste! {
impl<K, V> $ValidateCompositedTrait2 for std::collections::HashMap<K, V>
where
V: $ValidateCompositedTrait3,
Expand Down Expand Up @@ -297,7 +297,7 @@ macro_rules! impl_generic_composited_validation_1args {
$ErrorType:ident,
$type:ty
) => {
paste::paste! {
pastey::paste! {
impl<T> [<ValidateComposited $ErrorType >]<$type> for T
where
T: [<Validate $ErrorType >]<$type>,
Expand Down
2 changes: 1 addition & 1 deletion crates/serde_valid/src/validation/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{MaxItemsError, MinItemsError};

macro_rules! impl_validate_array_length_items {
($ErrorType:ident) => {
paste::paste! {
pastey::paste! {
impl<T> [<Validate $ErrorType>] for Option<T>
where
T: [<Validate $ErrorType>],
Expand Down
2 changes: 1 addition & 1 deletion crates/serde_valid/src/validation/composited.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub enum Composited<Error> {

macro_rules! impl_into_error {
($ErrorType:ident) => {
paste::paste! {
pastey::paste! {
impl IntoError<[<$ErrorType Error>]> for Composited<[<$ErrorType Error>]> {
fn into_error_by(self, format: crate::validation::error::Format<[<$ErrorType Error>]>) -> crate::validation::error::Error {
match self {
Expand Down
2 changes: 1 addition & 1 deletion crates/serde_valid_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ proc-macro = true

[dependencies]
itertools.workspace = true
paste.workspace = true
pastey.workspace = true
proc-macro-error2 = { workspace = true }
proc-macro2 = { workspace = true }
quote = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use quote::quote;
/// See <https://json-schema.org/understanding-json-schema/reference/array.html#length>
macro_rules! extract_array_length_validator{
($ErrorType:ident) => {
paste::paste! {
pastey::paste! {
pub fn [<extract_array_ $ErrorType:snake _validator>](
field: &impl Field,
validation_value: &syn::Lit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use quote::quote;
/// See <https://json-schema.org/understanding-json-schema/reference/numeric.html#range>
macro_rules! extract_numeric_range_validator{
($ErrorType:ident) => {
paste::paste! {
pastey::paste! {
pub fn [<extract_numeric_ $ErrorType:snake _validator>](
field: &impl Field,
validation_value: &syn::Expr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use quote::quote;
/// See <https://json-schema.org/understanding-json-schema/reference/object.html#size>
macro_rules! extract_object_size_validator {
($ErrorType:ident) => {
paste::paste! {
pastey::paste! {
pub fn [<extract_object_ $ErrorType:snake _validator>](
field: &impl Field,
validation_value: &syn::Lit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use quote::quote;
/// See <https://json-schema.org/understanding-json-schema/reference/string.html#length>
macro_rules! extract_string_length_validator{
($ErrorType:ident) => {
paste::paste! {
pastey::paste! {
pub fn [<extract_string_ $ErrorType:snake _validator>](
field: &impl Field,
validation_value: &syn::Lit,
Expand Down
2 changes: 1 addition & 1 deletion crates/serde_valid_literal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = []
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
paste = { workspace = true }
pastey = { workspace = true }
regex = { workspace = true }

[features]
Expand Down
2 changes: 1 addition & 1 deletion crates/serde_valid_literal/src/number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl std::fmt::Display for Number {

macro_rules! impl_from_trait {
($type:ty) => {
paste::paste! {
pastey::paste! {
impl From<$type> for Number {
fn from(item: $type) -> Self {
Number::[<$type:camel>](item)
Expand Down