mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
semver: run v fmt (#7439)
This commit is contained in:
@ -21,16 +21,12 @@ fn parse(input string) RawVersion {
|
||||
mut raw_version := input
|
||||
mut prerelease := ''
|
||||
mut metadata := ''
|
||||
plus_idx := raw_version.last_index('+') or {
|
||||
-1
|
||||
}
|
||||
plus_idx := raw_version.last_index('+') or { -1 }
|
||||
if plus_idx > 0 {
|
||||
metadata = raw_version[(plus_idx + 1)..]
|
||||
raw_version = raw_version[0..plus_idx]
|
||||
}
|
||||
hyphen_idx := raw_version.index('-') or {
|
||||
-1
|
||||
}
|
||||
hyphen_idx := raw_version.index('-') or { -1 }
|
||||
if hyphen_idx > 0 {
|
||||
prerelease = raw_version[(hyphen_idx + 1)..]
|
||||
raw_version = raw_version[0..hyphen_idx]
|
||||
|
Reference in New Issue
Block a user