refactor: move most of the horrible add_module macro content into proper functions
This commit is contained in:
@@ -22,7 +22,7 @@ pub struct SysInfoModule {
|
||||
interval: Interval,
|
||||
|
||||
#[serde(flatten)]
|
||||
pub common: CommonConfig,
|
||||
pub common: Option<CommonConfig>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Copy, Clone)]
|
||||
@@ -116,6 +116,10 @@ impl Module<gtk::Box> for SysInfoModule {
|
||||
type SendMessage = HashMap<String, String>;
|
||||
type ReceiveMessage = ();
|
||||
|
||||
fn name() -> &'static str {
|
||||
"sysinfo"
|
||||
}
|
||||
|
||||
fn spawn_controller(
|
||||
&self,
|
||||
_info: &ModuleInfo,
|
||||
|
||||
Reference in New Issue
Block a user