Skip to content

Conversation

@MarijnS95
Copy link
Member

Via include!() rustfmt doesn't know that this file belongs to the current project and doesn't autoformat it. Furthermore, jump-to-symbol likely doesn't play that well with include!().

Without creating a lib.rs file in utils/, use #[path] to reference the existing file without following a module hierarchy.

Note that the file remains in the utils/ folder as that doesn't get picked up by autoexamples.

…to fix autoformatting

Via `include!()` `rustfmt` doesn't know that this file belongs to the
current project and doesn't autoformat it. Furthermore, jump-to-symbol
likely doesn't play that well with `include!()`.

Without creating a `lib.rs` file in `utils/`, use `#[path]` to reference
the existing file without following a `mod`ule hierarchy.

Note that the file remains in the `utils/` folder as that doesn't get
picked up by `autoexamples`.
@MarijnS95 MarijnS95 force-pushed the example-utils-mod branch from cb3e3e8 to 0475574 Compare July 10, 2024 13:03
Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

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

Thanks!

@notgull notgull merged commit 0264cba into rust-windowing:master Jul 15, 2024
@MarijnS95 MarijnS95 deleted the example-utils-mod branch July 15, 2024 07:42
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.

2 participants