Pre-prune iobufs from clone
authorSubodh Iyengar <subodh@fb.com>
Tue, 29 Sep 2015 22:09:36 +0000 (15:09 -0700)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Tue, 29 Sep 2015 22:20:16 +0000 (15:20 -0700)
commit1f46d8c5a406a9eff75782c7693870fb51473d97
tree8662e8a8db7c4d893f46d3635c5697cce9e554df
parent2773b36d0fc36a9e2ca04a7600526086d3b4c0a2
Pre-prune iobufs from clone

Summary: It's pretty common during parsing protocols with cursors
that there will be empty iobufs along the way.

This changes it so that we prune empty IOBufs in the cloned
output before returning it to the user.

Reviewed By: @djwatson

Differential Revision: D2464488
folly/io/Cursor.h
folly/io/test/IOBufCursorTest.cpp