Skip to content

Commit

Permalink
fix overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Mar 8, 2024
1 parent bea9cec commit f576c2a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CARGO_HACK_ARGS=--feature-powerset --exclude-features default --group-features b

CARGO_DOC_ARGS?=--open

XDRGEN_VERSION=c95a5bd7f9dff8dff53cadcef3014ceb69ab7088
XDRGEN_VERSION=3f37191c1b26b39a4a8265a3824df6c3236cb120
# XDRGEN_LOCAL=1
XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12
XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12
Expand Down
26 changes: 13 additions & 13 deletions src/curr/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ impl<const MAX: u32> schemars::JsonSchema for BytesM<MAX> {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(MAX * 2),
max_length: MAX.checked_mul(2).map(Some).unwrap_or_default(),
min_length: None,
..string
})
Expand Down Expand Up @@ -10213,8 +10213,8 @@ impl schemars::JsonSchema for Thresholds {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(4 * 2),
min_length: Some(4 * 2),
max_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -10775,8 +10775,8 @@ impl schemars::JsonSchema for AssetCode4 {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(4 * 2),
min_length: Some(4 * 2),
max_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -10907,8 +10907,8 @@ impl schemars::JsonSchema for AssetCode12 {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(12 * 2),
min_length: Some(12 * 2),
max_length: 12_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 12_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -41162,8 +41162,8 @@ impl schemars::JsonSchema for Hash {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(32 * 2),
min_length: Some(32 * 2),
max_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -41311,8 +41311,8 @@ impl schemars::JsonSchema for Uint256 {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(32 * 2),
min_length: Some(32 * 2),
max_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -42451,8 +42451,8 @@ impl schemars::JsonSchema for SignatureHint {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(4 * 2),
min_length: Some(4 * 2),
max_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down
26 changes: 13 additions & 13 deletions src/next/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ impl<const MAX: u32> schemars::JsonSchema for BytesM<MAX> {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(MAX * 2),
max_length: MAX.checked_mul(2).map(Some).unwrap_or_default(),
min_length: None,
..string
})
Expand Down Expand Up @@ -10213,8 +10213,8 @@ impl schemars::JsonSchema for Thresholds {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(4 * 2),
min_length: Some(4 * 2),
max_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -10775,8 +10775,8 @@ impl schemars::JsonSchema for AssetCode4 {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(4 * 2),
min_length: Some(4 * 2),
max_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -10907,8 +10907,8 @@ impl schemars::JsonSchema for AssetCode12 {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(12 * 2),
min_length: Some(12 * 2),
max_length: 12_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 12_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -41162,8 +41162,8 @@ impl schemars::JsonSchema for Hash {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(32 * 2),
min_length: Some(32 * 2),
max_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -41311,8 +41311,8 @@ impl schemars::JsonSchema for Uint256 {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(32 * 2),
min_length: Some(32 * 2),
max_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down Expand Up @@ -42451,8 +42451,8 @@ impl schemars::JsonSchema for SignatureHint {
serde_json::Value::String("application/binary".to_string()),
);
mut_string(schema.into(), |string| schemars::schema::StringValidation {
max_length: Some(4 * 2),
min_length: Some(4 * 2),
max_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
min_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(),
..string
})
} else {
Expand Down

0 comments on commit f576c2a

Please sign in to comment.