unpackResult :: Packet -> Result ByteString
unpackResult pkt = Result (code, buf)
  where code = maybe Unknown id $ packetRetCode pkt
        buf  = packetMessage pkt

-- TODO: verify that results always span at most one packet
unpackResult :: Packet -> Result ByteString
unpackResult pkt = Result (code, buf)
  where code = maybe Unknown id $ packetRetCode pkt
        buf  = packetMessage pkt

-- TODO: verify that results always span at most one packet
unpackResult pkt = Result (code, buf)
  where code = maybe Unknown id $ packetRetCode pkt
        buf  = packetMessage pkt

-- TODO: verify that results always span at most one packet