]> Cypherpunks repositories - gostls13.git/commitdiff
Clean up some more code after bug143 was fixed.
authorDavid Symonds <dsymonds@golang.org>
Wed, 22 Apr 2009 03:24:28 +0000 (20:24 -0700)
committerDavid Symonds <dsymonds@golang.org>
Wed, 22 Apr 2009 03:24:28 +0000 (20:24 -0700)
R=r
APPROVED=r
DELTA=6  (0 added, 5 deleted, 1 changed)
OCL=27708
CL=27708

src/lib/exvar.go

index 6b2aaeb7a632e8177cf7b4ff3d1337b0a75e9647..d96e40aaef6e54af5f446201f0954175001e0700 100644 (file)
@@ -166,12 +166,7 @@ func GetMapInt(name string, key string) int {
        var i int;
        var ok bool;
        workSync(func(state *exVars) {
-               // This doesn't work:
-               //   i, ok = state.getOrInitMapVar(name)[key];
-               // exvar.go:169: assignment count mismatch: 2 = 1
-               // Should it? Wrapping the method call in () doesn't help.
-               mv := state.getOrInitMapVar(name);
-               i, ok = mv[key];
+               i, ok = state.getOrInitMapVar(name)[key]
        });
        return i
 }