Change ToRouteSegments to borrow self (#2283)
* Change display route segments to borrow the type * fix formatting
This commit is contained in:
1 parent
0127501dbf
commit
a35436ee4f
3 files changed
+25
-19
No files matched your search
@@ -279,13 +279,18 @@ pub(crate) fn create_error_type(
|
||||
quote! {
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum #error_name {
|
||||
ExtraSegments(String),
|
||||
#(#child_type_variant,)*
|
||||
#(#error_variants,)*
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for #error_name {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}({})", stringify!(#error_name), self)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for #error_name {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
|
||||
Reference in new issue
Block a user