chore: Method to return new renaming name of Mode if any

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-12-25 11:33:04 +00:00
parent 2866872265
commit 5e040d6530
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -9,3 +9,13 @@ pub enum Mode {
/// TODO
Rename(String),
}
impl Mode {
/// TODO
pub fn new_name(&self) -> Option<&str> {
match &self {
Mode::Rename(new_name) => Some(new_name),
_ => None,
}
}
}