Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@Lynnesbian
Copy link
Contributor

Summary

The doc comment for the menu! macro incorrectly stated that the custom widget syntax was custom => "name" rather than custom: "name". This PR corrects the error.

Trailing spaces on line 237 were stripped automatically when I formatted the file.

Checklist

  • cargo fmt
  • cargo clippy
  • cargo test
  • updated CHANGES.md

# Conflicts:
#	CHANGES.md

diff --git c/CHANGES.md i/CHANGES.md
index 3562c70..c57ab89 100644
--- c/CHANGES.md
+++ i/CHANGES.md
@@ -11,6 +11,7 @@
 + all: Update dependencies
 + core: Add gnome_49 feature flag for GNOME 49
 + core: Export `RelmSelectionExt` trait publicly from `relm4::typed_view` module to allow for user extensions of `TypedColumnView`
++ docs: Fix invalid syntax in `menu!` documentation

 ## 0.10.0 - 2025-09-01

diff --git c/relm4-macros/src/lib.rs i/relm4-macros/src/lib.rs
index df04068..fe9e065 100644
--- c/relm4-macros/src/lib.rs
+++ i/relm4-macros/src/lib.rs
@@ -234,7 +234,7 @@ pub fn component(attributes: TokenStream, input: TokenStream) -> TokenStream {
 ///     type Input = CounterMsg;
 ///     type Output = CounterOutput;
 ///     type ParentWidget = gtk::Box;
-///
+///
 ///
 ///     view! {
 ///         root = gtk::Box {
@@ -313,7 +313,7 @@ pub fn factory(attributes: TokenStream, input: TokenStream) -> TokenStream {
 ///
 /// + `"Label text" => ActionType,` to create new entries.
 /// + `"Label text" => ActionType(value),` to create new entries with action value.
-/// + `custom => "widget_id",` add a placeholder for custom widgets you can add later with [`set_attribute_name`](https://gtk-rs.org/gtk-rs-core/stable/0.15/docs/gio/struct.MenuItem.html#method.set_attribute_value).
+/// + `custom: "widget_id",` to add a placeholder for custom widgets you can add later with [`set_attribute_name`](https://gtk-rs.org/gtk-rs-core/stable/0.15/docs/gio/struct.MenuItem.html#method.set_attribute_value).
 /// + `section! { ... }` to create new sections.
 ///
 /// # Example
Copy link
Member

@AaronErhardt AaronErhardt left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

@AaronErhardt AaronErhardt merged commit 4f992ce into Relm4:main Dec 26, 2025
6 checks passed
@zekefast
Copy link
Contributor

Relm4/docs#12 fixed docs deployment. So, now your docs fix is on next docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants