chore: address Rust 1.83.0 clippy lints and enable more clippy lints (#6705)

This commit is contained in:
Sanchith Hegde
2024-12-02 20:00:44 +05:30
committed by GitHub
parent 797a0db773
commit 9a59d0a5ff
139 changed files with 147 additions and 417 deletions

View File

@ -135,7 +135,6 @@ pub struct IfStatement {
/// }
/// }
/// ```
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
#[serde(rename_all = "camelCase")]
#[aliases(RuleConnectorSelection = Rule<ConnectorSelection>)]

View File

@ -25,7 +25,6 @@ use crate::{
/// This serves for the purpose were we have the DirKey as an explicit Enum type and value as one
/// of the member of the same Enum.
/// So particularly it lowers a predefined Enum from DirKey to an Enum of DirValue.
macro_rules! lower_enum {
($key:ident, $value:ident) => {
match $value {
@ -70,7 +69,6 @@ macro_rules! lower_enum {
/// This is for the cases in which there are numerical values involved and they are lowered
/// accordingly on basis of the supplied key, currently payment_amount is the only key having this
/// use case
macro_rules! lower_number {
($key:ident, $value:ident, $comp:ident) => {
match $value {
@ -117,7 +115,6 @@ macro_rules! lower_number {
///
/// This serves for the purpose were we have the DirKey as Card_bin and value as an arbitrary string
/// So particularly it lowers an arbitrary value to a predefined key.
macro_rules! lower_str {
($key:ident, $value:ident $(, $validation_closure:expr)?) => {
match $value {
@ -155,7 +152,6 @@ macro_rules! lower_metadata {
/// by throwing required errors for comparisons that can't be performed for a certain value type
/// for example
/// can't have greater/less than operations on enum types
fn lower_comparison_inner<O: EuclidDirFilter>(
comp: ast::Comparison,
) -> Result<Vec<dir::DirValue>, AnalysisErrorType> {

View File

@ -51,9 +51,9 @@ impl EuclidParsable for DummyOutput {
)(input)
}
}
pub fn skip_ws<'a, F, O>(inner: F) -> impl FnMut(&'a str) -> ParseResult<&str, O>
pub fn skip_ws<'a, F, O>(inner: F) -> impl FnMut(&'a str) -> ParseResult<&'a str, O>
where
F: FnMut(&'a str) -> ParseResult<&str, O> + 'a,
F: FnMut(&'a str) -> ParseResult<&'a str, O> + 'a,
{
sequence::preceded(pchar::multispace0, inner)
}