sozu-proxy / circular

stream abstraction designed for use with nom
MIT License
11 stars 7 forks source link

Why does the Buffer have a capacity element #6

Open fogti opened 4 years ago

fogti commented 4 years ago

The memory element has a capacity() and a len() method (I think memory.len() might be the appropriate equivalent to self.capacity), why is it necessary to have another struct element capacity in the struct Buffer? This seems like duplicate book-keeping to me, why is that necessary?

see also: example of reduction