Make schema_name()
return Cow<'static, str>
instead of String
This commit is contained in:
parent
fe05631f21
commit
1aaa162e0b
25 changed files with 126 additions and 157 deletions
|
@ -114,8 +114,8 @@ fn type_for_schema(with_attr: &WithAttr) -> (syn::Type, Option<TokenStream>) {
|
|||
false
|
||||
}
|
||||
|
||||
fn schema_name() -> std::string::String {
|
||||
#fn_name.to_string()
|
||||
fn schema_name() -> std::borrow::Cow<'static, str> {
|
||||
std::borrow::Cow::Borrowed(#fn_name)
|
||||
}
|
||||
|
||||
fn schema_id() -> std::borrow::Cow<'static, str> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue