# HG changeset patch # User Mahlon E. Smith # Date 1432065318 25200 # Node ID 87a0365b799bf3526334c0b15d7f57b6748794f7 # Parent 755c3645e3dc11d56a998599406c8a2536e15d47 Remove unnecessary object creation. diff -r 755c3645e3dc -r 87a0365b799b tnetstring.nim --- a/tnetstring.nim Tue May 19 12:46:52 2015 -0700 +++ b/tnetstring.nim Tue May 19 12:55:18 2015 -0700 @@ -50,7 +50,7 @@ ## # tnetobj is now equivalent to the structure: ## # @[(key: test, val: 1.3), (key: key2, val: true), (key: things, val: @[1, 2, 3])] ## -## assert ( tnetobj.kind == TNetstringObject ) +## assert( tnetobj.kind == TNetstringObject ) ## echo tnetobj[ "test" ] ## echo tnetobj[ "key2" ] ## for item in tnetobj[ "things" ]: @@ -248,7 +248,6 @@ if ( key.kind != TNetstringString ): raiseParseErr( result, "Invalid data: Object keys must be strings." ) var value = parse_tnetstring( key.extra ) - result.fields = @[] result.fields.add( (key: key.str, val: value) ) while value.extra != "":