Skip to content

Commit 33902cb

Browse files
committed
Use schemars::JsonSchema consistently
1 parent d2edbc1 commit 33902cb

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

packages/std/src/addresses.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use alloc::{borrow::Cow, string::String, vec::Vec};
22
use core::fmt;
33
use core::ops::Deref;
4+
use schemars::JsonSchema;
45
use serde::{Deserialize, Serialize};
56
use sha2::{
67
digest::{Digest, Update},
@@ -27,7 +28,7 @@ use crate::{HexBinary, __internal::forward_ref_partial_eq};
2728
/// a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String`
2829
/// instance.
2930
#[derive(
30-
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, schemars::JsonSchema,
31+
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, JsonSchema,
3132
)]
3233
pub struct Addr(String);
3334

packages/std/src/errors/system_error.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use alloc::string::String;
2+
use schemars::JsonSchema;
23
use serde::{Deserialize, Serialize};
34

45
use crate::Binary;
@@ -12,9 +13,7 @@ use crate::Binary;
1213
///
1314
/// Such errors are only created by the VM. The error type is defined in the standard library, to ensure
1415
/// the contract understands the error format without creating a dependency on cosmwasm-vm.
15-
#[derive(
16-
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, schemars::JsonSchema, thiserror::Error,
17-
)]
16+
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, thiserror::Error)]
1817
#[serde(rename_all = "snake_case")]
1918
#[non_exhaustive]
2019
pub enum SystemError {

packages/std/src/timestamp.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use core::fmt;
2+
use schemars::JsonSchema;
23
use serde::{Deserialize, Serialize};
34

45
use crate::Uint64;
@@ -22,17 +23,7 @@ use crate::Uint64;
2223
/// assert_eq!(ts.subsec_nanos(), 202);
2324
/// ```
2425
#[derive(
25-
Serialize,
26-
Deserialize,
27-
Copy,
28-
Clone,
29-
Default,
30-
Debug,
31-
PartialEq,
32-
Eq,
33-
PartialOrd,
34-
Ord,
35-
schemars::JsonSchema,
26+
Serialize, Deserialize, Copy, Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, JsonSchema,
3627
)]
3728
pub struct Timestamp(Uint64);
3829

0 commit comments

Comments
 (0)