mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
parent
8f7c35552d
commit
17000ef7b6
49 changed files with 129 additions and 106 deletions
|
@ -38,7 +38,7 @@ pub fn (err InvalidVersionFormatError) msg() string {
|
|||
|
||||
// * Constructor.
|
||||
// from returns a `Version` structure parsed from `input` `string`.
|
||||
pub fn from(input string) ?Version {
|
||||
pub fn from(input string) !Version {
|
||||
if input.len == 0 {
|
||||
return &EmptyInputError{}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ import semver
|
|||
v := semver.coerce('1.3-RC1-b2') or { semver.Version{} }
|
||||
assert v.satisfies('>1.0 <2.0') == true // 1.3.0
|
||||
*/
|
||||
pub fn coerce(input string) ?Version {
|
||||
pub fn coerce(input string) !Version {
|
||||
return coerce_version(input)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue