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:
Jack Amadeo 2026-07-23 15:59:55 -04:00 • committed by GitHub
commit 76988023b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
})