Implement into_static for CowStr and Event in pulldown-cmark - #967
Conversation
|
Please ignore/let me know if my auto-formatter messed things up in the repo. |
|
I'm not a maintainer but when I contribute to this project I usually try not to apply code formatter in order to avoid unnecessary code changes. |
|
I think it's long overdue that we enforce rustfmt in CI, but that's something to do separately (and I don't know of other's opinions). |
|
Yeah, but I didn't notice the auto-formatter until I commited. This pull request is just adding things, nothing on changing things, so it should not be hard to read, it's just some files. Please forgive me for that :) |
No worries! If you want to though, you could restore (at least the files that have no other changes) & squash. |
|
I could, but can we leave them be? I think it's good to have them formatted anyway. If it's a blocker for merging. I will do it. |
|
Yeah it's fine, we can leave it be. |
|
Thanks for the PR! This is simple yet quite useful. |
Fixes: #625
I found that we cannot implement ToOwned, but I found the following code:
So, I added similar implementations for other types with lifetimes so we can use them more freely.