Properly handle appending to the tail of the chain
authorStepan Palamarchuk <stepan@fb.com>
Wed, 17 Jan 2018 11:12:41 +0000 (03:12 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 17 Jan 2018 11:21:26 +0000 (03:21 -0800)
commit86cefd11d497791f00769e69fba550f710906527
tree98bfe191c5934a3b4ba54f2b48787c0571653e12
parent9bf260657e140cace3cab8850d6a40fac3a5cd93
Properly handle appending to the tail of the chain

Summary: Currently appending to the tail of the chain would cause the cursor advancing to the beginning of the chain, which is not correct, instead we should advance to the tail.

Reviewed By: yfeldblum

Differential Revision: D6734999

fbshipit-source-id: b8b2585e0475b656f7b6bf4ed39686e2ccb2e432
folly/io/Cursor.h
folly/io/test/IOBufCursorTest.cpp