File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -679,17 +679,17 @@ trait pub IntoIter[T] {
679
679
# nums.next # => Option.Some(1)
680
680
# }
681
681
# ```
682
- type pub Stream[T] {
682
+ type pub inline Stream[T] {
683
683
let @func: fn -> Option[T]
684
684
685
685
# Returns a new iterator using the closure.
686
- fn pub static new(func: fn -> Option[T]) -> Stream[T] {
686
+ fn pub inline static new(func: fn -> Option[T]) -> Stream[T] {
687
687
Stream(func)
688
688
}
689
689
}
690
690
691
691
impl Iter[T] for Stream {
692
- fn pub mut next -> Option[T] {
692
+ fn pub inline mut next -> Option[T] {
693
693
@func.call
694
694
}
695
695
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import std.clone (Clone)
24
24
import std.cmp (Contains, Equal)
25
25
import std.fmt (Format, Formatter)
26
26
import std.hash (Hash, Hasher)
27
- import std.iter (Iter, Stream)
27
+ import std.iter (Stream)
28
28
29
29
# A range of integers.
30
30
trait pub Range: Contains[Int] + Hash + Format {
@@ -41,10 +41,10 @@ trait pub Range: Contains[Int] + Hash + Format {
41
41
fn pub size -> Int
42
42
43
43
# Returns an iterator over the values in `self`.
44
- fn pub iter -> Iter [Int]
44
+ fn pub iter -> Stream [Int]
45
45
46
46
# Moves `self` into an iterator.
47
- fn pub move into_iter -> Iter [Int] {
47
+ fn pub move into_iter -> Stream [Int] {
48
48
iter
49
49
}
50
50
}
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ trait pub Bytes {
172
172
fn pub byte(index: Int) -> Int
173
173
174
174
# Returns an iterator over the bytes in `self`.
175
- fn pub bytes -> Iter [Int]
175
+ fn pub bytes -> Stream [Int]
176
176
177
177
# Returns the number of bytes in `self`.
178
178
fn pub size -> Int
You can’t perform that action at this time.
0 commit comments