start renaming IOBuf::prependChain() to IOBuf::appendToChain()
Summary: The `prependChain()` and `appendChain()` method names have always been confusing, ever since they were first added in D271954. These methods prepend and append immediately before or after the current element. However, because IOBuf chains are circular, this effectively means that `prependChain()` appends to the very end of the chain when called on the head of an IOBuf chain. This is almost always how it is used in practice, so having it be named `prependChain()` is quite confusing. (Note that in the initial version of D271954 these methods were originally named `appendChain()` and `appendChainHere()`, but were unfortunately renamed during review.) This diff adds alternate names for these methods, so we can migrate call sites to use the new names, and then deprecate these existing names. `appendToChain()` is the new recommended name for `prependChain()`, and `insertAfterThisOne()` is the new recommended name for `appendChain()` Reviewed By: voznesenskym Differential Revision: D32524091 fbshipit-source-id: faf74f8803947c6452a10b58ced0c38efbd320fd
Showing
Please register or sign in to comment