-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add titles to enum types for better readability
- Loading branch information
1 parent
b10e4be
commit 0a686f1
Showing
2 changed files
with
47 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
#![cfg(feature = "curr")] | ||
#![cfg(all(feature = "schemars", feature = "serde", feature = "alloc"))] | ||
#![cfg(feature = "wasm")] | ||
|
||
use stellar_xdr::curr as stellar_xdr; | ||
use stellar_xdr::{curr::TypeVariant, schema::Schema}; | ||
|
||
#[allow(clippy::too_many_lines)] | ||
#[test] | ||
fn test_serde_tx_schema() -> Result<(), Box<dyn std::error::Error>> { | ||
let schema = schemars::schema_for!(stellar_xdr::ScVal); | ||
let s = serde_json::to_string_pretty(&schema)?; | ||
let schema: Schema = TypeVariant::ScVal.try_into()?; | ||
let s = serde_json::to_string_pretty(&schema.0)?; | ||
println!("{s}"); | ||
Ok(()) | ||
} |