diff options
author | Nadrieril | 2020-10-28 20:38:29 +0000 |
---|---|---|
committer | GitHub | 2020-10-28 20:38:29 +0000 |
commit | 70727acbda68e104f60ae1dbbe95adbcec08a628 (patch) | |
tree | ac3f0782fb90c8f6b03b3d29d1032d06d637e4ee /serde_dhall/src/options | |
parent | 2b4ba42b7f0a44893f17548f069cec1e60819aa4 (diff) | |
parent | 9e3f68fc54babf24133cf66ae6be7d069ba2c271 (diff) |
Merge pull request #188 from Nadrieril/change-nums
Use u64/i64 instead of usize/isize for the main number types
Diffstat (limited to '')
-rw-r--r-- | serde_dhall/src/options.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/serde_dhall/src/options.rs b/serde_dhall/src/options.rs index 76b1c5b..7b27114 100644 --- a/serde_dhall/src/options.rs +++ b/serde_dhall/src/options.rs @@ -76,7 +76,7 @@ impl<T: StaticType> HasAnnot<StaticAnnot> for T { /// let ty = from_str("{ x: Natural, y: Natural }").parse()?; /// let data = from_file("foo.dhall") /// .type_annotation(&ty) -/// .parse::<HashMap<String, usize>>()?; +/// .parse::<HashMap<String, u64>>()?; /// # Ok(()) /// # } /// ``` @@ -130,7 +130,7 @@ impl<'a> Deserializer<'a, NoAnnot> { /// let data = "{ x = 1, y = 1 + 1 }"; /// let point = from_str(data) /// .type_annotation(&ty) - /// .parse::<HashMap<String, usize>>()?; + /// .parse::<HashMap<String, u64>>()?; /// assert_eq!(point.get("y"), Some(&2)); /// /// // Invalid data fails the type validation; deserialization would have succeeded otherwise. @@ -138,7 +138,7 @@ impl<'a> Deserializer<'a, NoAnnot> { /// assert!( /// from_str(invalid_data) /// .type_annotation(&ty) - /// .parse::<HashMap<String, usize>>() + /// .parse::<HashMap<String, u64>>() /// .is_err() /// ); /// # Ok(()) |