Something went wrong. Try again.
A fork of helix with a bespoke collection patches.
Something went wrong. Try again.
Prefer RopeSlice to &Rope in helix_core::syntax master
Pascal and I discussed this and we think it's generally better to take a 'RopeSlice' rather than a '&Rope'. The code block rendering function in the markdown component module is a good example for how this can be useful: we can remove an allocation of a rope and instead directly turn a '&str' into a 'RopeSlice' which is very cheap. A change to prefer 'RopeSlice' to '&Rope' whenever the rope isn't modified would be nice, but it would be a very large diff (around 500+ 500-). Starting off with just the syntax functions seems like a nice middle-ground, and we can remove a Rope allocation because of it. Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
Author Michael Davis Co-author Pascal Kuthe Committer Blaž Hrastnik Date (Jul 27, 2023, 2:50 AM UTC) Commit 98ef05d7 98ef05d768d287fef2eb790e0a8a6e9a72832e00 Parent f0b877e2 f0b877e2588306882f71eaad45a3f3e604885a34