sink: add `SinkString::empty` and `SinkString::with_capacity`

main
pantonshire 3 years ago
parent e1e26c7fd5
commit 266fa13165

@ -68,6 +68,18 @@ mod string_sink {
pub struct SinkString(pub String);
impl SinkString {
#[inline]
#[must_use]
pub fn empty() -> Self {
Self(String::new())
}
#[inline]
#[must_use]
pub fn with_capacity(capacity: usize) -> Self {
Self(String::with_capacity(capacity))
}
#[inline]
#[must_use]
pub fn from_string_ref(s: &String) -> &Self {

Loading…
Cancel
Save