@@ -513,10 +513,7 @@ fn append_add_button(list: >k::ListBox, label: &str, on_activate: impl Fn() +
513513/// indexes list to show UNIQUE / PRIMARY tags. `accent_class` is the
514514/// CSS class controlling the colour (`dim-label`, `accent`, etc.).
515515fn index_badge ( label : & str , accent_class : & str ) -> gtk:: Label {
516- let badge = gtk:: Label :: builder ( )
517- . label ( label)
518- . valign ( gtk:: Align :: Center )
519- . build ( ) ;
516+ let badge = gtk:: Label :: builder ( ) . label ( label) . valign ( gtk:: Align :: Center ) . build ( ) ;
520517 badge. add_css_class ( "caption" ) ;
521518 badge. add_css_class ( accent_class) ;
522519 badge
@@ -633,8 +630,7 @@ fn build_column_expander_row(
633630 field : ColumnField :: Type ( e. text ( ) . to_string ( ) ) ,
634631 } ) ;
635632 } ) ;
636- let ( suggestions_button, suggestions_popover) =
637- build_type_suggestions_button ( driver_id, & type_row) ;
633+ let ( suggestions_button, suggestions_popover) = build_type_suggestions_button ( driver_id, & type_row) ;
638634 type_row. add_suffix ( & suggestions_button) ;
639635 popover_registry. borrow_mut ( ) . push ( suggestions_popover) ;
640636 row. add_row ( & type_row) ;
@@ -830,7 +826,6 @@ fn build_fk_row(
830826 row
831827}
832828
833-
834829/// Validate the model against driver constraints before Save. Returns
835830/// the first user-visible error string, or None if all checks pass.
836831fn validate_save ( table_name : & str , columns : & [ DraftColumn ] , mode : StructureMode ) -> Result < ( ) , String > {
@@ -1443,17 +1438,11 @@ impl SimpleComponent for StructureTab {
14431438/// can register it for popdown on rebuild — otherwise an open menu
14441439/// would keep its captured target alive and dispatch a click into a
14451440/// detached AdwEntryRow.
1446- fn build_type_suggestions_button (
1447- driver_id : & str ,
1448- target : & adw:: EntryRow ,
1449- ) -> ( gtk:: MenuButton , gtk:: Popover ) {
1441+ fn build_type_suggestions_button ( driver_id : & str , target : & adw:: EntryRow ) -> ( gtk:: MenuButton , gtk:: Popover ) {
14501442 // Per-button action group: one action `apply` keyed by `String`
14511443 // parameter. Each menu item activates `types.apply::<typename>`.
14521444 let action_group = gio:: SimpleActionGroup :: new ( ) ;
1453- let apply_action = gio:: SimpleAction :: new (
1454- "apply" ,
1455- Some ( & String :: static_variant_type ( ) ) ,
1456- ) ;
1445+ let apply_action = gio:: SimpleAction :: new ( "apply" , Some ( & String :: static_variant_type ( ) ) ) ;
14571446 let target_for_action = target. clone ( ) ;
14581447 apply_action. connect_activate ( move |_, param| {
14591448 if let Some ( s) = param. and_then ( |v| v. get :: < String > ( ) ) {
@@ -1469,10 +1458,7 @@ fn build_type_suggestions_button(
14691458 let menu = gio:: Menu :: new ( ) ;
14701459 for ty in driver_types ( driver_id) {
14711460 let item = gio:: MenuItem :: new ( Some ( ty) , None ) ;
1472- item. set_action_and_target_value (
1473- Some ( "types.apply" ) ,
1474- Some ( & ty. to_variant ( ) ) ,
1475- ) ;
1461+ item. set_action_and_target_value ( Some ( "types.apply" ) , Some ( & ty. to_variant ( ) ) ) ;
14761462 menu. append_item ( & item) ;
14771463 }
14781464
0 commit comments