• Home
  • Raw
  • Download

Lines Matching refs:version

23             .and_then(|(version, _)| version)  in read()
24 .and_then(|version| Version::parse(&version)) in read()
57 pub fn parse(version: &str) -> Option<Version> { in parse()
58 let splits = version.split('-') in parse()
135 pub fn at_least(&self, version: &str) -> bool { in at_least()
136 Version::parse(version) in at_least()
137 .map(|version| self >= &version) in at_least()
160 pub fn at_most(&self, version: &str) -> bool { in at_most()
161 Version::parse(version) in at_most()
162 .map(|version| self <= &version) in at_most()
184 pub fn exactly(&self, version: &str) -> bool { in exactly()
185 Version::parse(version) in exactly()
186 .map(|version| self == &version) in exactly()
272 let version = Version::parse("1.18.0").unwrap(); in test_comparisons() localVariable
273 assert!(version.exactly("1.18.0")); in test_comparisons()
274 assert!(version.at_least("1.12.0")); in test_comparisons()
275 assert!(version.at_least("1.12")); in test_comparisons()
276 assert!(version.at_least("1")); in test_comparisons()
277 assert!(version.at_most("1.18.1")); in test_comparisons()
278 assert!(!version.exactly("1.19.0")); in test_comparisons()
279 assert!(!version.exactly("1.18.1")); in test_comparisons()
281 let version = Version::parse("1.20.0-nightly").unwrap(); in test_comparisons() localVariable
282 assert!(version.exactly("1.20.0-beta")); in test_comparisons()
283 assert!(version.exactly("1.20.0-nightly")); in test_comparisons()
284 assert!(version.exactly("1.20.0")); in test_comparisons()
285 assert!(!version.exactly("1.19")); in test_comparisons()
287 let version = Version::parse("1.3").unwrap(); in test_comparisons() localVariable
288 assert!(version.exactly("1.3.0")); in test_comparisons()
289 assert!(version.exactly("1.3.0-stable")); in test_comparisons()
290 assert!(version.exactly("1.3")); in test_comparisons()
291 assert!(!version.exactly("1.5.0-stable")); in test_comparisons()
293 let version = Version::parse("1").unwrap(); in test_comparisons() localVariable
294 assert!(version.exactly("1.0.0")); in test_comparisons()
295 assert!(version.exactly("1.0")); in test_comparisons()
296 assert!(version.exactly("1")); in test_comparisons()