Apply cargo fmt (#1146)

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2023-08-28 16:03:29 +03:00
committed by GitHub
parent b413e5e84e
commit 91a56fd580
18 changed files with 157 additions and 74 deletions
+13 -3
View File
@@ -187,11 +187,21 @@ impl TypeSubstitutes {
src_path: &syn::Path,
target_path: &syn::Path,
) -> Result<TypeParamMapping, TypeSubstitutionError> {
let Some(syn::PathSegment { arguments: src_path_args, .. }) = src_path.segments.last() else {
let Some(syn::PathSegment {
arguments: src_path_args,
..
}) = src_path.segments.last()
else {
return Err(TypeSubstitutionError::EmptySubstitutePath(src_path.span()));
};
let Some(syn::PathSegment { arguments: target_path_args, .. }) = target_path.segments.last() else {
return Err(TypeSubstitutionError::EmptySubstitutePath(target_path.span()));
let Some(syn::PathSegment {
arguments: target_path_args,
..
}) = target_path.segments.last()
else {
return Err(TypeSubstitutionError::EmptySubstitutePath(
target_path.span(),
));
};
// Get hold of the generic args for the "from" type, erroring if they aren't valid.