Skip to content

Commit c871773

Browse files
committed
Updates fixed-size suffix
Compiler gives the following warning: `warning: the `u` suffix on integers is deprecated; use `us` or one of the fixed-sized suffixes` And also the errror: `error: mismatched types: expected `u64`, found `usize` (expected u64, found usize)` Changing the suffix to `u64` results in a successful `cargo run` outputting the desired `Versions compared successfully!`
1 parent 099b411 commit c871773

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ use semver::Version;
106106
107107
fn main() {
108108
assert!(Version::parse("1.2.3") == Ok(Version {
109-
major: 1u,
110-
minor: 2u,
111-
patch: 3u,
109+
major: 1u64,
110+
minor: 2u64,
111+
patch: 3u64,
112112
pre: vec!(),
113113
build: vec!(),
114114
}));

0 commit comments

Comments
 (0)