Tidy up _from_list

- remove unused variable
- switch from `range` to `enumerate` for indexed iteration
This commit is contained in:
Kamal Marhubi
2015-05-30 19:42:27 -04:00
parent b31b53b6a7
commit 211192f235

View File

@@ -873,10 +873,10 @@ cdef _to_dict(msg, bint verbose, bint ordered):
return msg return msg
cdef _from_list(_DynamicListBuilder msg, list d): cdef _from_list(_DynamicListBuilder msg, list d):
cdef size_t count = 0 for i, x in enumerate(d):
for i in range(len(d)): msg._set(i, x)
msg._set(i, d[i])
cdef class _DynamicEnum: cdef class _DynamicEnum: