Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
go
Commits
62d11a33
Commit
62d11a33
authored
15 years ago
by
Rob Pike
Browse files
Options
Download
Email Patches
Plain Diff
use range in vector iterator
R=rsc DELTA=2 (0 added, 0 deleted, 2 changed) OCL=27003 CL=27003
parent
6d5bba51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/lib/container/vector.go
src/lib/container/vector.go
+2
-2
No files found.
src/lib/container/vector.go
View file @
62d11a33
...
...
@@ -214,8 +214,8 @@ func (p *Vector) Swap(i, j int) {
// Iterate over all elements; driver for range
func
(
p
*
Vector
)
iterate
(
c
chan
Element
)
{
for
i
:=
0
;
i
<
len
(
p
.
a
);
i
++
{
c
<-
p
.
a
[
i
]
for
i
,
v
:=
range
p
.
a
{
c
<-
v
}
close
(
c
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment