diff options
Diffstat (limited to 'src/libsemver/lib.rs')
| -rw-r--r-- | src/libsemver/lib.rs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/libsemver/lib.rs b/src/libsemver/lib.rs index fea473f35b4..a119d4832db 100644 --- a/src/libsemver/lib.rs +++ b/src/libsemver/lib.rs @@ -308,14 +308,14 @@ fn test_parse() { major: 1u, minor: 2u, patch: 3u, - pre: vec!(AlphaNumeric("alpha1".to_strbuf())), + pre: vec!(AlphaNumeric("alpha1".to_string())), build: vec!(), })); assert!(parse(" 1.2.3-alpha1 ") == Some(Version { major: 1u, minor: 2u, patch: 3u, - pre: vec!(AlphaNumeric("alpha1".to_strbuf())), + pre: vec!(AlphaNumeric("alpha1".to_string())), build: vec!() })); assert!(parse("1.2.3+build5") == Some(Version { @@ -323,37 +323,37 @@ fn test_parse() { minor: 2u, patch: 3u, pre: vec!(), - build: vec!(AlphaNumeric("build5".to_strbuf())) + build: vec!(AlphaNumeric("build5".to_string())) })); assert!(parse(" 1.2.3+build5 ") == Some(Version { major: 1u, minor: 2u, patch: 3u, pre: vec!(), - build: vec!(AlphaNumeric("build5".to_strbuf())) + build: vec!(AlphaNumeric("build5".to_string())) })); assert!(parse("1.2.3-alpha1+build5") == Some(Version { major: 1u, minor: 2u, patch: 3u, - pre: vec!(AlphaNumeric("alpha1".to_strbuf())), - build: vec!(AlphaNumeric("build5".to_strbuf())) + pre: vec!(AlphaNumeric("alpha1".to_string())), + build: vec!(AlphaNumeric("build5".to_string())) })); assert!(parse(" 1.2.3-alpha1+build5 ") == Some(Version { major: 1u, minor: 2u, patch: 3u, - pre: vec!(AlphaNumeric("alpha1".to_strbuf())), - build: vec!(AlphaNumeric("build5".to_strbuf())) + pre: vec!(AlphaNumeric("alpha1".to_string())), + build: vec!(AlphaNumeric("build5".to_string())) })); assert!(parse("1.2.3-1.alpha1.9+build5.7.3aedf ") == Some(Version { major: 1u, minor: 2u, patch: 3u, - pre: vec!(Numeric(1),AlphaNumeric("alpha1".to_strbuf()),Numeric(9)), - build: vec!(AlphaNumeric("build5".to_strbuf()), + pre: vec!(Numeric(1),AlphaNumeric("alpha1".to_string()),Numeric(9)), + build: vec!(AlphaNumeric("build5".to_string()), Numeric(7), - AlphaNumeric("3aedf".to_strbuf())) + AlphaNumeric("3aedf".to_string())) })); } @@ -378,13 +378,13 @@ fn test_ne() { #[test] fn test_show() { assert_eq!(format_strbuf!("{}", parse("1.2.3").unwrap()), - "1.2.3".to_strbuf()); + "1.2.3".to_string()); assert_eq!(format_strbuf!("{}", parse("1.2.3-alpha1").unwrap()), - "1.2.3-alpha1".to_strbuf()); + "1.2.3-alpha1".to_string()); assert_eq!(format_strbuf!("{}", parse("1.2.3+build.42").unwrap()), - "1.2.3+build.42".to_strbuf()); + "1.2.3+build.42".to_string()); assert_eq!(format_strbuf!("{}", parse("1.2.3-alpha1+42").unwrap()), - "1.2.3-alpha1+42".to_strbuf()); + "1.2.3-alpha1+42".to_string()); } #[test] |
