]> Cypherpunks repositories - gostls13.git/commitdiff
use new conversion syntax to simplify test
authorRob Pike <r@golang.org>
Thu, 8 May 2008 00:34:51 +0000 (17:34 -0700)
committerRob Pike <r@golang.org>
Thu, 8 May 2008 00:34:51 +0000 (17:34 -0700)
SVN=118019

src/lib/container/vector.go

index 7081bd3a953eb0bd41c63a400e1ac4d5085434a5..d6de66ef5759b9f83d10e661a12ff3d30796f317 100644 (file)
@@ -121,9 +121,7 @@ func Test() {
        v.Insert(0, i1);
        v.Insert(0, i0);
        for i := 0; i < v.Len(); i++ {
-               var x *I;
-               x = v.At(i);
-               print i, " ", x.val, "\n";
+               print i, " ", v.At(i).(*I).val, "\n";
        }
 }