use struct update syntax in with_step()

This commit is contained in:
ge
2026-01-11 08:41:46 +03:00
parent 06f85c48d3
commit 39314b474b

View File

@@ -32,11 +32,9 @@ pub fn (mut r Range[T]) reset() {
// with_step returns copy of the range with new step value. // with_step returns copy of the range with new step value.
pub fn (r Range[T]) with_step[T](step T) Range[T] { pub fn (r Range[T]) with_step[T](step T) Range[T] {
return Range[T]{ return Range[T]{
start: r.start ...r
end: r.end step: step
step: step cur: r.start
is_neg: r.is_neg
cur: r.start
} }
} }