We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f401e32 commit b590fefCopy full SHA for b590fef
src/lib.rs
@@ -266,6 +266,17 @@ pub struct Version {
266
}
267
268
impl Version {
269
+ /// Create [Version] with a major, minor, and patch version.
270
+ pub const fn new(major: u64, minor: u64, patch: u64) -> Self {
271
+ Self {
272
+ major,
273
+ minor,
274
+ patch,
275
+ build: Vec::new(),
276
+ pre_release: Vec::new(),
277
+ }
278
279
+
280
/// True if this [Version] satisfies the given [Range].
281
pub fn satisfies(&self, range: &Range) -> bool {
282
range.satisfies(self)
0 commit comments