refactor: move dynamic_label.rs to dynamic_string.rs and fix failing test
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::modules::workspaces::WorkspaceUpdate;
|
||||
use crate::modules::{Module, ModuleInfoBuilder, ModuleLocation, ModuleUpdateEvent, WidgetContext};
|
||||
use crate::popup::Popup;
|
||||
use crate::script::{OutputStream, Script};
|
||||
use crate::widgets::DynamicString;
|
||||
use crate::dynamic_string::DynamicString;
|
||||
use crate::{await_sync, Config};
|
||||
use chrono::{DateTime, Local};
|
||||
use color_eyre::Result;
|
||||
|
||||
@@ -134,7 +134,7 @@ mod tests {
|
||||
DynamicString::new(
|
||||
"Uptime: {{1000:uptime -p | cut -d ' ' -f2-}}",
|
||||
move |string| {
|
||||
label.set_label(string);
|
||||
label.set_label(&string);
|
||||
Continue(true)
|
||||
},
|
||||
);
|
||||
@@ -8,7 +8,7 @@ mod modules;
|
||||
mod popup;
|
||||
mod script;
|
||||
mod style;
|
||||
mod widgets;
|
||||
mod dynamic_string;
|
||||
|
||||
use crate::bar::create_bar;
|
||||
use crate::config::{Config, MonitorConfig};
|
||||
|
||||
@@ -2,7 +2,7 @@ use crate::config::CommonConfig;
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::popup::{ButtonGeometry, Popup};
|
||||
use crate::script::Script;
|
||||
use crate::widgets::DynamicString;
|
||||
use crate::dynamic_string::DynamicString;
|
||||
use color_eyre::{Report, Result};
|
||||
use gtk::prelude::*;
|
||||
use gtk::{Button, Label, Orientation};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
mod dynamic_label;
|
||||
|
||||
pub use dynamic_label::DynamicString;
|
||||
Reference in New Issue
Block a user