• Ajit Banerjee's avatar
    Fix cursor insert inconsistency · a4d8d010
    Ajit Banerjee authored
    Summary:
    The invariant after Cursor::insert is that the cursor points to the buffer
    after the insert. That invariant was not followed in the branch where the
    new buffer was just prepended. This change fixes the bug.
    
    Test Plan:
    Unit test modified, all tests run with
    fbconfig -r folly && fbmake runtests_opt
    
    Reviewed By: davejwatson@fb.com
    
    FB internal diff: D1114749
    a4d8d010
IOBufCursorTest.cpp 19.2 KB