-
-
Notifications
You must be signed in to change notification settings - Fork 25
fix clippy warnings #51
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
base: main
Are you sure you want to change the base?
Conversation
Remove unit value let-bindings and assert_eq comparisons in tests. Use matches! macro instead of match expression in lexer.
Make error messages more user-friendly and actionable when version specifications are missing components (e.g., '0.34' instead of '0.34.0'). Before: 'missing patch version: 0.34' After: 'incomplete version: 0.34.x - versions must follow MAJOR.MINOR.PATCH format (e.g., 0.34.0)' Also added tests for range parsing with incomplete versions to ensure these error cases are properly covered. Addresses issue gleam-lang#35
lpil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I've left some notes in line
| fmt, | ||
| "incomplete version: {}.x.x - versions must follow MAJOR.MINOR.PATCH format (e.g., {}.0.0)", | ||
| major, major | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem unrelated to clippy. Could you revert them please
| config.api_base = http::Uri::try_from(server.url()).unwrap(); | ||
|
|
||
| let result = crate::api_remove_docs_response( | ||
| crate::api_remove_docs_response( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests no longer ensure the return type is unit. Add an annotation or similar to put back that test functionality please.
| assert!(error_msg.contains("incomplete version")); | ||
| assert!(error_msg.contains("1.x.x")); | ||
| assert!(error_msg.contains("1.0.0")); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem unrelated to clippy, please remove them
Remove unit value let-bindings and assert_eq comparisons in tests. Use matches! macro instead of match expression in lexer.