Closed madsmtm closed 1 year ago
Heh, yeah… you probably noticed I have a distinct (ish) style I use when I write code. I don’t mind if people want standard cargo formatting though.
I’m out of town until Sunday evening but should be able to look at then or early this week. :)
Thanks!
On Sat, Jul 9, 2022 at 18:09, Mads Marquart @.***> wrote:
Motivation: I find when reading code that it helps me quite a lot if it is formatted consistently.
I set the line width to 130 to keep the diff a bit smaller, if there's something else you don't quite like, I'm fine with tweaking the options.
Not really sure how to get this merged with the cleanest diff in the end, probably best of you merged the airyx-appkit-uikit-features branch first.
(Getting started on properly contributing to this crate, yay!)
You can view, comment on, or merge this pull request online at:
https://github.com/ryanmcgrath/cacao/pull/29
Commit Summary
- 8d17eab Configure rustfmt line width
- 9aae20a Run cargo fmt
- 52ecb7e Add CI and gate on
cargo fmt
outputFile Changes
- A .github/workflows/ci.yml (18)
- M build.rs (8)
- M examples/animation.rs (71)
- M examples/autolayout.rs (67)
- M examples/browser/main.rs (123)
- M examples/browser/toolbar.rs (17)
- M examples/calculator/button_row.rs (71)
- M examples/calculator/calculator.rs (38)
- M examples/calculator/content_view.rs (81)
- M examples/calculator/main.rs (22)
- M examples/defaults.rs (2)
- M examples/frame_layout.rs (69)
- M examples/ios-beta/main.rs (28)
- M examples/text_input.rs (95)
- M examples/todos_list/add/mod.rs (14)
- M examples/todos_list/add/view.rs (16)
- M examples/todos_list/app.rs (4)
- M examples/todos_list/main.rs (5)
- M examples/todos_list/menu.rs (112)
- M examples/todos_list/preferences/advanced.rs (12)
- M examples/todos_list/preferences/general.rs (23)
- M examples/todos_list/preferences/mod.rs (16)
- M examples/todos_list/preferences/toggle_option_view.rs (16)
- M examples/todos_list/preferences/toolbar.rs (65)
- M examples/todos_list/storage/defaults.rs (13)
- M examples/todos_list/storage/mod.rs (6)
- M examples/todos_list/storage/todos.rs (14)
- M examples/todos_list/todos/content_view.rs (8)
- M examples/todos_list/todos/list/mod.rs (45)
- M examples/todos_list/todos/list/row.rs (11)
- M examples/todos_list/todos/mod.rs (10)
- M examples/todos_list/todos/toolbar.rs (7)
- M examples/todos_list/windows.rs (34)
- M examples/webview_custom_protocol.rs (26)
- M examples/window.rs (51)
- M examples/window_controller.rs (61)
- M examples/window_delegate.rs (63)
- A rustfmt.toml (1)
- M src/appkit/alert.rs (12)
- M src/appkit/animation.rs (17)
- M src/appkit/app/class.rs (6)
- M src/appkit/app/delegate.rs (310)
- M src/appkit/app/enums.rs (44)
- M src/appkit/app/mod.rs (55)
- M src/appkit/app/traits.rs (84)
- M src/appkit/cursor.rs (24)
- M src/appkit/enums.rs (10)
- M src/appkit/event/mod.rs (23)
- M src/appkit/menu/item.rs (77)
- M src/appkit/menu/menu.rs (79)
- M src/appkit/printing/enums.rs (6)
- M src/appkit/printing/settings.rs (4)
- M src/appkit/toolbar/class.rs (49)
- M src/appkit/toolbar/enums.rs (12)
- M src/appkit/toolbar/item.rs (26)
- M src/appkit/toolbar/mod.rs (31)
- M src/appkit/toolbar/traits.rs (8)
- M src/appkit/window/class.rs (208)
- M src/appkit/window/config.rs (22)
- M src/appkit/window/controller/class.rs (6)
- M src/appkit/window/controller/mod.rs (17)
- M src/appkit/window/enums.rs (14)
- M src/appkit/window/mod.rs (133)
- M src/appkit/window/traits.rs (22)
- M src/button/enums.rs (8)
- M src/button/mod.rs (74)
- M src/cloudkit/share.rs (4)
- M src/color/appkit_dynamic_color.rs (242)
- M src/color/mod.rs (161)
- M src/control/mod.rs (17)
- M src/defaults/mod.rs (31)
- M src/defaults/value.rs (40)
- M src/dragdrop.rs (9)
- M src/error.rs (4)
- M src/events.rs (8)
- M src/filesystem/enums.rs (16)
- M src/filesystem/manager.rs (23)
- M src/filesystem/mod.rs (1)
- M src/filesystem/save.rs (12)
- M src/filesystem/select.rs (34)
- M src/filesystem/traits.rs (10)
- M src/foundation/array.rs (26)
- M src/foundation/autoreleasepool.rs (8)
- M src/foundation/class.rs (43)
- M src/foundation/data.rs (34)
- M src/foundation/dictionary.rs (6)
- M src/foundation/mod.rs (8)
- M src/foundation/number.rs (34)
- M src/foundation/string.rs (28)
- M src/foundation/urls/bookmark_options.rs (22)
- M src/foundation/urls/mod.rs (40)
- M src/foundation/urls/resource_keys.rs (6)
- M src/geometry.rs (22)
- M src/image/appkit.rs (6)
- M src/image/icons.rs (14)
- M src/image/image.rs (90)
- M src/image/mod.rs (46)
- M src/input/appkit.rs (25)
- M src/input/mod.rs (71)
- M src/invoker.rs (37)
- M src/keys.rs (2)
- M src/layer/mod.rs (12)
- M src/layout/animator.rs (8)
- M src/layout/attributes.rs (36)
- M src/layout/constraint.rs (25)
- M src/layout/dimension.rs (45)
- M src/layout/horizontal.rs (102)
- M src/layout/mod.rs (2)
- M src/layout/safe_guide.rs (8)
- M src/layout/traits.rs (50)
- M src/layout/vertical.rs (43)
- M src/lib.rs (15)
- M src/listview/actions.rs (20)
- M src/listview/appkit.rs (152)
- M src/listview/enums.rs (14)
- M src/listview/mod.rs (175)
- M src/listview/row/appkit.rs (94)
- M src/listview/row/mod.rs (138)
- M src/listview/traits.rs (28)
- M src/networking/mod.rs (18)
- M src/notification_center/mod.rs (2)
- M src/notification_center/name.rs (39)
- M src/pasteboard/mod.rs (24)
- M src/pasteboard/types.rs (6)
- M src/progress/enums.rs (6)
- M src/progress/mod.rs (52)
- M src/quicklook/config.rs (26)
- M src/quicklook/mod.rs (13)
- M src/scrollview/appkit.rs (80)
- M src/scrollview/mod.rs (109)
- M src/scrollview/traits.rs (16)
- M src/select/mod.rs (70)
- M src/switch.rs (59)
- M src/text/attributed_string.rs (22)
- M src/text/enums.rs (10)
- M src/text/font.rs (14)
- M src/text/label/appkit.rs (12)
- M src/text/label/mod.rs (130)
- M src/text/label/traits.rs (3)
- M src/uikit/app/class.rs (6)
- M src/uikit/app/delegate.rs (25)
- M src/uikit/app/enums.rs (1)
- M src/uikit/app/mod.rs (66)
- M src/uikit/scene/config.rs (8)
- M src/uikit/scene/delegate.rs (46)
- M src/uikit/scene/enums.rs (6)
- M src/uikit/scene/mod.rs (9)
- M src/uikit/scene/options.rs (6)
- M src/uikit/scene/session.rs (10)
- M src/uikit/scene/traits.rs (9)
- M src/uikit/window/mod.rs (7)
- M src/user_activity.rs (8)
- M src/user_notifications/enums.rs (6)
- M src/user_notifications/mod.rs (9)
- M src/user_notifications/notifications.rs (6)
- M src/utils/cell_factory.rs (21)
- M src/utils/mod.rs (27)
- M src/utils/os.rs (4)
- M src/utils/properties.rs (18)
- M src/view/animator.rs (8)
- M src/view/appkit.rs (82)
- M src/view/controller/appkit.rs (24)
- M src/view/controller/mod.rs (14)
- M src/view/controller/uikit.rs (36)
- M src/view/mod.rs (76)
- M src/view/splitviewcontroller/mod.rs (37)
- M src/view/traits.rs (22)
- M src/view/uikit.rs (4)
- M src/webview/actions.rs (34)
- M src/webview/class.rs (107)
- M src/webview/config.rs (18)
- M src/webview/enums.rs (24)
- M src/webview/mimetype.rs (114)
- M src/webview/mod.rs (97)
- M src/webview/traits.rs (4)
Patch Links:
- https://github.com/ryanmcgrath/cacao/pull/29.patch
- https://github.com/ryanmcgrath/cacao/pull/29.diff
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
I tweaked a few more options to better match your "distinct (ish) style" 😉 - some of these require using cargo +nightly fmt
though
trunk
should be up to date regarding any of my changes now - apologies if you got any notifications saying this was closed, it looks like that happened when I deleted the other branch... I restored it and reopened but feel free to reissue the PR if easier.
I'd be down to look at getting this merged, but I'll defer to you if you think it's ready to hit that "ready to review" button. Thanks again for moving on all this - super cool work!
Wonderful, I rebased so you can take a look now, each commit by itself should hopefully be fairly easy to verify
Motivation: I find when reading code that it helps me quite a lot if it is formatted consistently.
I set the line width to
130
to keep the diff a bit smaller, if there's something else you don't quite like, I'm fine with tweaking the options.Not really sure how to get this merged with the cleanest diff in the end, probably best of you merged the
airyx-appkit-uikit-features
branch first.(Getting started on properly contributing to this crate, yay!)