chore: declare and check MSRV (#1034)
* chore: declare and check MSRV * fix: clippy fixes for collapsing if-statements * ci: add explicit contents read permission to MSRV job
This commit is contained in:
parent
e660b805ee
commit
76988023b2
1 changed files with 322 additions and 315 deletions
|
|
@ -55,17 +55,15 @@ pub fn extract_doc_line(
|
|||
/// Returns the full Parameters<T> type if found
|
||||
pub fn find_parameters_type_in_sig(sig: &Signature) -> Option<Box<Type>> {
|
||||
sig.inputs.iter().find_map(|input| {
|
||||
if let FnArg::Typed(pat_type) = input {
|
||||
if let Type::Path(type_path) = &*pat_type.ty {
|
||||
if type_path
|
||||
.path
|
||||
.segments
|
||||
.last()
|
||||
.is_some_and(|type_name| type_name.ident == "Parameters")
|
||||
{
|
||||
return Some(pat_type.ty.clone());
|
||||
}
|
||||
}
|
||||
if let FnArg::Typed(pat_type) = input
|
||||
&& let Type::Path(type_path) = &*pat_type.ty
|
||||
&& type_path
|
||||
.path
|
||||
.segments
|
||||
.last()
|
||||
.is_some_and(|type_name| type_name.ident == "Parameters")
|
||||
{
|
||||
return Some(pat_type.ty.clone());
|
||||
}
|
||||
None
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue