sgmlish 0.1.0

Simple parsing and deserialization of SGML
Documentation
1
2
3
4
5
6
7
8
use std::borrow::Cow;

pub(crate) fn make_owned<T: ?Sized + ToOwned>(cow: Cow<T>) -> Cow<'static, T> {
    match cow {
        Cow::Borrowed(x) => Cow::Owned(x.to_owned()),
        Cow::Owned(x) => Cow::Owned(x),
    }
}