Open richard-uk1 opened 4 years ago
I find I end up writing
let x = bumpalo::format!(in cx.bump, "{}", var).into_bump_str();
a lot, so my suggestion is to add
trait ToBumpString: Display { fn to_bump_str<'a>(&self, arena: &'a Bump) -> &'a str { bumpalo::format!(in arena, "{}", var).into_bump_str(); }
matching ToString (except that we want a &str).
ToString
&str
This makes sense to me, but in the bumpalo crate.
bumpalo
ToString doesn't require Display, but instead has a blanket implementation for all T: Display. I think it makes sense to copy that here.
Display
T: Display
I find I end up writing
a lot, so my suggestion is to add
matching
ToString
(except that we want a&str
).