These are chat archives for rust-lang/rust
findwill return the pos of the first location. But how to find the second?
finddoes not accept a position and I do not see another method that does. My use case right now is finding the contents of a string. I just found the first double quote. How do I locate the next one? I do not have to worry about nested quotes so easy brute force is fine.
let pos1 = s.find("foo").unwrap(); let pos2 = s[pos1..].find("foo").
std::Vecuses 2! I wonder if there's an issue on the Rust repository about changing this to 1.5...
If so I guess for large vectors, the better strategy would be to ask for a super large capacity upfront. Most allocators will call mmap for those. As long as we don't touch them, the OS will not have physical memory to back those.
Hm, I wonder if you need to relocate vectors at all if you are allocating in pages...
addrand you have a page allocated at
addr+16you'll have to reallocate.
yes as long as you have the virtual memory reserved right?
I think even that is not required!
matchis three lines, so it's not that difficult to be more readable :-)
Resulta lot more than
Option. If I am using combinators on
OptionI think it'll usually be part of an