mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
cb81dc535c
Added CharIndices::offset function The CharIndices iterator has a field internally called front_offset, that I think would be very useful to have access to. You can already do something like ``char_indices.next().map(|(offset, _)| offset)``, but that is wordy, in addition to not handling the case where the iterator has ended, where you'd want the offset to be equal to the length. I'm very new to the open source world and the rust repository, so I'm sorry if I missed a step or did something weird. |
||
---|---|---|
.. | ||
alloc | ||
backtrace@710fc18ddc | ||
core | ||
panic_abort | ||
panic_unwind | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@19f5459dd0 | ||
term | ||
test | ||
unwind |