Closed alexheretic closed 7 months ago
@Veykril did you get a chance to look at this, any issues?
Ah sorry, I missed this. Sounds reasonable
It would be nice to have a new release with this
Sorry, published 0.2.2
now
Or not, need to ask someone regarding perms as the team that managed them (which i was part of) has been deleted
I guess you need to replace your ci CRATES_IO_TOKEN
env var. You are a owner on crates.io so could also publish manually if you can't access to the repo settings.
I wasn't an owner a couple of minutes ago, just sorted it out publish succeeded now
Wonderful cheers mate!
Add
StrExt::replace_smolstr
,StrExt::replacen_smolstr
.This is useful to avoid allocation on small strings, e.g:
Impl adapted from std
str::replacen
.One undesirable difference from std is
from
usesPattern
instr::replace
but this is not stable and can't be used here. However, I still think this version withfrom: &str
is quite useful & worth having. Also if/whenPattern
stabilizes we can start using it as a non-breaking change, since&str
will implement it.Note: While not needed for this PR this kind of usage is an example of why https://github.com/rust-analyzer/smol_str/issues/70 would be useful for external use.