mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: change index expr returning optional to result too (#16097)
This commit is contained in:
parent
eda65ad660
commit
612faac0f0
14 changed files with 63 additions and 47 deletions
|
@ -144,16 +144,16 @@ fn test_ranges() {
|
|||
assert s6 == 'first'
|
||||
}
|
||||
|
||||
fn ranges_propagate_first(s string) ?string {
|
||||
return s[10..]?
|
||||
fn ranges_propagate_first(s string) !string {
|
||||
return s[10..]!
|
||||
}
|
||||
|
||||
fn ranges_propagate_last(s string) ?string {
|
||||
return s[..20]?
|
||||
fn ranges_propagate_last(s string) !string {
|
||||
return s[..20]!
|
||||
}
|
||||
|
||||
fn ranges_propagate_both(s string) ?string {
|
||||
return s[1..20]?
|
||||
fn ranges_propagate_both(s string) !string {
|
||||
return s[1..20]!
|
||||
}
|
||||
|
||||
fn test_split_nth() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue