Skip to content

Commit

Permalink
[feature] hyperledger-iroha#2004: Forbid isize and usize from bec…
Browse files Browse the repository at this point in the history
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
  • Loading branch information
appetrosyan committed May 2, 2022
1 parent bf7d1fe commit ef6cd16
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions schema/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ fixnum = { version = "0.6.1", default-features = false, features = ["i64"] }

[dev-dependencies]
parity-scale-codec = { version = "2.3.1", default-features = false, features = ["derive", "full"] }
impls = { version = "=1.0.0" }
8 changes: 8 additions & 0 deletions schema/tests/architecture-dependent.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use impls::impls;
use iroha_schema::IntoSchema;

#[test]
fn usize_isize_not_into_schema() {
assert!(!impls!(usize: IntoSchema));
assert!(!impls!(isize: IntoSchema));
}

0 comments on commit ef6cd16

Please sign in to comment.