-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Introduce traits for SidePanel and TopBottomPanel #5651
base: master
Are you sure you want to change the base?
Conversation
note: it would have been better to name it `trait Side`, but without renaming `enum Side`, it is not possible.
EDIT: Seems that removing the I have some trouble with + ./scripts/lint.py
./crates/egui/src/containers/panel.rs:72: builder methods should be marked #[inline]
./crates/egui/src/containers/panel.rs:77: builder methods should be marked #[inline]
./crates/egui/src/containers/panel.rs:80: builder methods should be marked #[inline]
./crates/egui/src/containers/panel.rs:83: builder methods should be marked #[inline]
./crates/egui/src/containers/panel.rs:86: builder methods should be marked #[inline]
./crates/egui/src/containers/panel.rs:89: builder methods should be marked #[inline]
./crates/egui/src/containers/panel.rs:92: builder methods should be marked #[inline]
./crates/egui/src/containers/panel.rs:95: builder methods should be marked #[inline] + ./scripts/lint.py
./scripts/lint.py finished without error
+ cargo fmt --all -- --check
+ cargo doc --quiet --lib --no-deps --all-features
[...]
error: `#[inline]` is ignored on function prototypes
--> crates/egui/src/containers/panel.rs:72:5
|
72 | #[inline]
| ^^^^^^^^^
|
= note: `-D unused-attributes` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_attributes)]`
|
Ran the test locally, I have the following result: |
Turns out, my idea wasn't as easy to implement that I expected (Rust beginner here 😅). I'll rethink this a bit! |
Panel
trait forSidePanel
andTopBottomPanel
#5643I made the change against 0.30.0 for now to test in my own code if that work like I hoped. I will bring the changes in master afterwards.