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
@@ -657,11 +657,16 @@ impl RouteEnum {
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum #match_error_name {
|
||||
#(#error_variants),*
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for #match_error_name {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}({})", stringify!(#match_error_name), self)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for #match_error_name {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
|
||||
Reference in new issue
Block a user