Make to_cow_str() for event types public as at least some hedge against unconditional to_string().
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
9f6c48eea2
commit
d96d981475
@ -208,7 +208,7 @@ fn generate_enum(
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl #ident {
|
||||
fn to_cow_str(&self) -> ::std::borrow::Cow<'_, ::std::primitive::str> {
|
||||
pub fn to_cow_str(&self) -> ::std::borrow::Cow<'_, ::std::primitive::str> {
|
||||
match self {
|
||||
#(#to_cow_str_match_arms,)*
|
||||
Self::_Custom(crate::PrivOwnedStr(s)) => ::std::borrow::Cow::Borrowed(s),
|
||||
|
Loading…
x
Reference in New Issue
Block a user