diff --git a/src/ui/effect.rs b/src/ui/effect.rs index 7617632..adfca98 100644 --- a/src/ui/effect.rs +++ b/src/ui/effect.rs @@ -6,6 +6,8 @@ use crate::view::Axis; use super::app::{App, AppMode}; +pub(crate) const RECORD_COORDS_CANNOT_BE_EMPTY: &str = "Record coordinates cannot be empty"; + /// A discrete state change produced by a command. /// Effects know how to apply themselves to the App. pub trait Effect: Debug { @@ -459,7 +461,7 @@ impl Effect for ApplyAndClearDrill { app.model.set_cell(orig_key.clone(), value); } else { if new_value.is_empty() { - app.status_msg = "Record coordinates cannot be empty".to_string(); + app.status_msg = RECORD_COORDS_CANNOT_BE_EMPTY.to_string(); continue; } // Rename a coordinate: remove old cell, insert new with updated coord