-
Notifications
You must be signed in to change notification settings - Fork 70
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
Relm4 format #385
base: main
Are you sure you want to change the base?
Relm4 format #385
Conversation
Would be nice to handle GTK macros like |
8c8778d
to
7d53b1c
Compare
Signed-off-by: Aaron Erhardt <aaron.erhardt@t-online.de>
Signed-off-by: Aaron Erhardt <aaron.erhardt@t-online.de>
Signed-off-by: Aaron Erhardt <aaron.erhardt@t-online.de>
Signed-off-by: Aaron Erhardt <aaron.erhardt@t-online.de>
Signed-off-by: Aaron Erhardt <aaron.erhardt@t-online.de>
Signed-off-by: Aaron Erhardt <aaron.erhardt@t-online.de>
050d85c
to
7370977
Compare
@@ -13,6 +13,12 @@ impl Parse for ViewWidgets { | |||
|
|||
while input.peek(Token![,]) { | |||
let _colon: Token![,] = input.parse()?; | |||
|
|||
// Allow ending with a comma after the last widget |
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.
This should really be it's own commit and probably a separate PR which could be merged immediately. Trailing comma support on the widgets is one of the rough edges of relm4 that I've encountered too often.
I haven't given this a proper review as I'm not familiar with the internals of relm4 yet. But I want to add some comments based on a quick scan of the code.
|
Thanks for your review! |
DO NOT TRY THIS WITHOUT COMMITTING YOUR CHANGES BEFORE! THE TOOL ISN'T COMPLETE AND MAY CAUSE LOSS OF DATA.
Summary
The tool can be installed with
cargo install --path=PATH_TO_RELM4_FORMAT_CRATE
.It can be called from the command line with
relm4-format file1 file2
or justrelm4-format
to format all Rust files contained in the working directory. Be cautious, commit all changes before using!Checklist