Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macros: error: use type definitions for reduce complexity #898

Open
wants to merge 1 commit into
base: rust
Choose a base branch
from

Conversation

aliceinwire
Copy link

fix clippy error: very complex type used.
Consider factoring parts into type definitions

Signed-off-by: Alice Ferrazzi alice.ferrazzi@miraclelinux.com
Reviewed-by: Luca Barbato lu_zero@gentoo.org

fix clippy error: very complex type used.
Consider factoring parts into `type` definitions

Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Luca Barbato <lu_zero@gentoo.org>
@@ -145,7 +145,7 @@ fn param_ops_path(param_type: &str) -> &'static str {

fn try_simple_param_val(
param_type: &str,
) -> Box<dyn Fn(&mut token_stream::IntoIter) -> Option<String>> {
) -> FnTrySimpleParam {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with clippy here. In any case if a type alias is used, I think it should be put in the same module.

Copy link
Member

@ojeda ojeda Sep 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree with @bjorn3, especially if the alias is only used once or a few times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants