aboutsummaryrefslogtreecommitdiff
path: root/src/stages.rs
diff options
context:
space:
mode:
authorRubén Beltrán del Río <jj@r.bdr.sh>2026-01-17 11:22:22 +0100
committerRubén Beltrán del Río <jj@r.bdr.sh>2026-01-17 12:24:45 +0100
commit88d6bf80f5cdbbb90ead197bd41a67eb8c44e50e (patch)
tree401549b24fe8a747ef6739389b1b38f33ef016bb /src/stages.rs
parent17898fbabde35ab346c133114e78614e707c0eca (diff)
Make clippy stricter and fix
Diffstat (limited to 'src/stages.rs')
-rw-r--r--src/stages.rs46
1 files changed, 38 insertions, 8 deletions
diff --git a/src/stages.rs b/src/stages.rs
index 8de8f89..3ab1f5a 100644
--- a/src/stages.rs
+++ b/src/stages.rs
@@ -14,8 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-use wmap_renderer::StageType;
use crate::tr;
+use wmap_renderer::StageType;
/// All available stage types for rendering Wardley Maps.
/// Order determines dropdown menu order.
@@ -77,7 +77,13 @@ impl LocalizedStageType for StageType {
StageType::Behavior => tr!("stages.behavior.name"),
StageType::Cynefin => tr!("stages.cynefin.name"),
StageType::EvolutionStage => tr!("stages.evolution_stage.name"),
- StageType::Custom{name, i: _, ii: _, iii: _, iv: _} => name.to_string()
+ StageType::Custom {
+ name,
+ i: _,
+ ii: _,
+ iii: _,
+ iv: _,
+ } => name.clone(),
}
}
fn localized_i(&self) -> String {
@@ -104,7 +110,13 @@ impl LocalizedStageType for StageType {
StageType::Behavior => tr!("stages.behavior.i"),
StageType::Cynefin => tr!("stages.cynefin.i"),
StageType::EvolutionStage => tr!("stages.evolution_stage.i"),
- StageType::Custom{name: _, i, ii: _, iii: _, iv: _} => i.to_string()
+ StageType::Custom {
+ name: _,
+ i,
+ ii: _,
+ iii: _,
+ iv: _,
+ } => i.clone(),
}
}
fn localized_ii(&self) -> String {
@@ -131,7 +143,13 @@ impl LocalizedStageType for StageType {
StageType::Behavior => tr!("stages.behavior.ii"),
StageType::Cynefin => tr!("stages.cynefin.ii"),
StageType::EvolutionStage => tr!("stages.evolution_stage.ii"),
- StageType::Custom{name: _, i: _, ii, iii: _, iv: _} => ii.to_string()
+ StageType::Custom {
+ name: _,
+ i: _,
+ ii,
+ iii: _,
+ iv: _,
+ } => ii.clone(),
}
}
fn localized_iii(&self) -> String {
@@ -158,7 +176,13 @@ impl LocalizedStageType for StageType {
StageType::Behavior => tr!("stages.behavior.iii"),
StageType::Cynefin => tr!("stages.cynefin.iii"),
StageType::EvolutionStage => tr!("stages.evolution_stage.iii"),
- StageType::Custom{name: _, i: _, ii: _, iii, iv: _} => iii.to_string()
+ StageType::Custom {
+ name: _,
+ i: _,
+ ii: _,
+ iii,
+ iv: _,
+ } => iii.clone(),
}
}
fn localized_iv(&self) -> String {
@@ -185,17 +209,23 @@ impl LocalizedStageType for StageType {
StageType::Behavior => tr!("stages.behavior.iv"),
StageType::Cynefin => tr!("stages.cynefin.iv"),
StageType::EvolutionStage => tr!("stages.evolution_stage.iv"),
- StageType::Custom{name: _, i: _, ii: _, iii: _, iv} => iv.to_string()
+ StageType::Custom {
+ name: _,
+ i: _,
+ ii: _,
+ iii: _,
+ iv,
+ } => iv.clone(),
}
}
fn to_localized(&self) -> StageType {
- StageType::Custom{
+ StageType::Custom {
name: self.localized_name(),
i: self.localized_i(),
ii: self.localized_ii(),
iii: self.localized_iii(),
- iv: self.localized_iv()
+ iv: self.localized_iv(),
}
}
}