Closed dashed closed 7 years ago
into_inner
seems to be a good solution to the fundamental parts of this problem (since you need to disassemble it and reassemble it anyway), though a wrapper for buffer::Source
and/or buffer::Stream
would probably be handy.
If you'd like you can submit the into_inner
implementation as a PR?
If you'd like you can submit the
into_inner
implementation as a PR?
Sure definitely; I'll see if I can PR with some tests this weekend.
Hi!
I have a usecase where I'd need to adapt
chomp::buffer::InputBuf
tochomp::types::numbering::InputPosition
(via wrapping) and back again (via unwrapping).However, I'm unable to unwrap
Input
fromInputPosition
.I simply add
impl IntoInner
trait toInputPosition
: https://github.com/dashed/chomp/commit/e5dfe7e6d161f79d004e7315e35771edcfee0777My use case is as follows; I'd love any feedback or better alternative approaches: