Skip to content

Commit

Permalink
pretty-print numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Oct 15, 2022
1 parent 646f5dd commit c7b41a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rust/candid/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "candid"
version = "0.8.2"
version = "0.8.3"
edition = "2018"
authors = ["DFINITY Team"]
description = "Candid is an interface description language (IDL) for interacting with canisters running on the Internet Computer."
Expand Down
12 changes: 6 additions & 6 deletions rust/candid/src/parser/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ pub fn number_to_string(v: &IDLValue) -> String {
Int(n) => n.to_string(),
Nat(n) => n.to_string(),
Nat8(n) => n.to_string(),
Nat16(n) => n.to_string(),
Nat32(n) => n.to_string(),
Nat64(n) => n.to_string(),
Nat16(n) => pp_num_str(&n.to_string()),
Nat32(n) => pp_num_str(&n.to_string()),
Nat64(n) => pp_num_str(&n.to_string()),
Int8(n) => n.to_string(),
Int16(n) => n.to_string(),
Int32(n) => n.to_string(),
Int64(n) => n.to_string(),
Int16(n) => pp_num_str(&n.to_string()),
Int32(n) => pp_num_str(&n.to_string()),
Int64(n) => pp_num_str(&n.to_string()),
Float32(f) => f.to_string(),
Float64(f) => f.to_string(),
_ => unreachable!(),
Expand Down
2 changes: 1 addition & 1 deletion tools/didc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "didc"
version = "0.1.4"
version = "0.1.5"
authors = ["DFINITY Team"]
edition = "2018"

Expand Down

0 comments on commit c7b41a0

Please sign in to comment.