diff options
| author | Richo Healey <richo@psych0tik.net> | 2014-06-21 03:39:03 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-07-08 13:01:43 -0700 |
| commit | 12c334a77b897f7b1cb6cff3c56a71ecb89c82af (patch) | |
| tree | 1f5a85061a69058875391ec6171cf8b446996dff /src/libsemver | |
| parent | bfe4ddfdea45533c98657701509bb7185fd96cba (diff) | |
| download | rust-12c334a77b897f7b1cb6cff3c56a71ecb89c82af.tar.gz rust-12c334a77b897f7b1cb6cff3c56a71ecb89c82af.zip | |
std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.
[breaking-change]
Diffstat (limited to 'src/libsemver')
| -rw-r--r-- | src/libsemver/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsemver/lib.rs b/src/libsemver/lib.rs index 31a065a1449..95eac25ab5b 100644 --- a/src/libsemver/lib.rs +++ b/src/libsemver/lib.rs @@ -270,7 +270,7 @@ pub fn parse(s: &str) -> Option<Version> { let v = parse_iter(&mut s.chars()); match v { Some(v) => { - if v.to_str().equiv(&s) { + if v.to_string().equiv(&s) { Some(v) } else { None @@ -391,11 +391,11 @@ fn test_show() { } #[test] -fn test_to_str() { - assert_eq!(parse("1.2.3").unwrap().to_str(), "1.2.3".to_string()); - assert_eq!(parse("1.2.3-alpha1").unwrap().to_str(), "1.2.3-alpha1".to_string()); - assert_eq!(parse("1.2.3+build.42").unwrap().to_str(), "1.2.3+build.42".to_string()); - assert_eq!(parse("1.2.3-alpha1+42").unwrap().to_str(), "1.2.3-alpha1+42".to_string()); +fn test_to_string() { + assert_eq!(parse("1.2.3").unwrap().to_string(), "1.2.3".to_string()); + assert_eq!(parse("1.2.3-alpha1").unwrap().to_string(), "1.2.3-alpha1".to_string()); + assert_eq!(parse("1.2.3+build.42").unwrap().to_string(), "1.2.3+build.42".to_string()); + assert_eq!(parse("1.2.3-alpha1+42").unwrap().to_string(), "1.2.3-alpha1+42".to_string()); } #[test] |
