@@ -18,7 +18,7 @@ use cosmic_settings_page::{self as page, Section};
1818use slab:: Slab ;
1919use std:: collections:: HashMap ;
2020
21- pub struct PageInner {
21+ pub struct Page {
2222 pub ( crate ) config_helper : Option < cosmic_config:: Config > ,
2323 pub ( crate ) panel_config : Option < CosmicPanelConfig > ,
2424 pub outputs : Vec < String > ,
@@ -31,7 +31,7 @@ pub struct PageInner {
3131 pub ( crate ) system_container : Option < CosmicPanelContainerConfig > ,
3232}
3333
34- impl Default for PageInner {
34+ impl Default for Page {
3535 fn default ( ) -> Self {
3636 Self {
3737 config_helper : Option :: default ( ) ,
@@ -72,9 +72,9 @@ impl Default for PageInner {
7272}
7373
7474pub trait PanelPage {
75- fn inner ( & self ) -> & PageInner ;
75+ fn inner ( & self ) -> & Page ;
7676
77- fn inner_mut ( & mut self ) -> & mut PageInner ;
77+ fn inner_mut ( & mut self ) -> & mut Page ;
7878
7979 fn autohide_label ( & self ) -> String ;
8080
@@ -336,14 +336,14 @@ pub fn reset_button<
336336#[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
337337pub struct Anchor ( PanelAnchor ) ;
338338
339- impl ToString for Anchor {
340- fn to_string ( & self ) -> String {
341- match self . 0 {
339+ impl std :: fmt :: Display for Anchor {
340+ fn fmt ( & self , f : & mut std :: fmt :: Formatter < ' _ > ) -> std :: fmt :: Result {
341+ f . write_str ( & match self . 0 {
342342 PanelAnchor :: Top => fl ! ( "panel-top" ) ,
343343 PanelAnchor :: Bottom => fl ! ( "panel-bottom" ) ,
344344 PanelAnchor :: Left => fl ! ( "panel-left" ) ,
345345 PanelAnchor :: Right => fl ! ( "panel-right" ) ,
346- }
346+ } )
347347 }
348348}
349349
@@ -354,13 +354,13 @@ pub enum Appearance {
354354 Dark ,
355355}
356356
357- impl ToString for Appearance {
358- fn to_string ( & self ) -> String {
359- match self {
357+ impl std :: fmt :: Display for Appearance {
358+ fn fmt ( & self , f : & mut std :: fmt :: Formatter < ' _ > ) -> std :: fmt :: Result {
359+ f . write_str ( & match self {
360360 Appearance :: Match => fl ! ( "panel-appearance" , "match" ) ,
361361 Appearance :: Light => fl ! ( "panel-appearance" , "light" ) ,
362362 Appearance :: Dark => fl ! ( "panel-appearance" , "dark" ) ,
363- }
363+ } )
364364 }
365365}
366366
@@ -404,7 +404,7 @@ pub enum Message {
404404 FullReset ,
405405}
406406
407- impl PageInner {
407+ impl Page {
408408 #[ allow( clippy:: too_many_lines) ]
409409 pub fn update ( & mut self , message : Message ) {
410410 let Some ( helper) = self . config_helper . as_ref ( ) else {
0 commit comments