Skip to content

Commit

Permalink
Remove unused _lets variable.
Browse files Browse the repository at this point in the history
See #406.
  • Loading branch information
flatheadmill committed Jan 18, 2020
1 parent ba2aadd commit 0aa3378
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions serialize.inc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const $ = require('programmatic')
const join = require('./join')

function generate (packet) {
let step = 0, _lets = [], index = -1, isLengthEncoded = packet.lengthEncoded
let step = 0, index = -1, isLengthEncoded = packet.lengthEncoded

function integer (path, field) {
const endianness = field.endianness || 'big'
Expand Down Expand Up @@ -45,7 +45,6 @@ function generate (packet) {
const I = `$I[${index}]`
index--
const again = step
_lets.push(packet.name)
return $(`
`, field([ `${path.join('.')}[${i}]` ], packet.element), `
Expand Down Expand Up @@ -99,10 +98,6 @@ function generate (packet) {
`)
}
const object = 'serializers.inc.' + packet.name
let lets = null && _lets.length > 0 ? $(`
let ${_lets.join(', ')}
`) : null
const generated = $(`
${object} = function (${packet.name}, $step = 0, $i = []) {
let $bite, $stop, $_
Expand Down

0 comments on commit 0aa3378

Please sign in to comment.