diff --git a/.rust-toolchain.toml b/.rust-toolchain.toml new file mode 100644 index 0000000..f19782d --- /dev/null +++ b/.rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.92.0" diff --git a/Jenkinsfile b/Jenkinsfile index 140070d..a7ed200 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,6 +17,13 @@ pipeline { } } + stage('Update') { + steps { + sh "rustup update" + // sh "rustup show" + } + } + /* =============== END USER CONFIG ================== */ @@ -25,9 +32,9 @@ pipeline { steps { script { if (env.BRANCH_NAME == 'origin/review' || env.BRANCH_NAME == 'review' || env.BRANCH_NAME == 'origin/dev-ci' || env.BRANCH_NAME == 'dev-ci') { - sh 'cargo +nightly test' + sh 'cargo test' } else if (env.BRANCH_NAME == 'origin/master' || env.BRANCH_NAME == 'master') { - sh 'cargo +nightly test' + sh 'cargo test' } else { echo "Unknown branch: ${env.BRANCH_NAME} - skipping build." } diff --git a/lib_efo/src/entity/implementations.rs b/lib_efo/src/entity/implementations.rs index ae83516..f565fe4 100644 --- a/lib_efo/src/entity/implementations.rs +++ b/lib_efo/src/entity/implementations.rs @@ -22,14 +22,6 @@ impl Displayable for Entity { } } - // Short, single-line representation - fn print_short(&self) { - println!("{}", self.to_pretty_tree()); - if let Ok(c) = self.stats_to_table() { - println!("{c}"); - } - } - /// One-liner used for auto-generation of Vec displays fn oneline_display(&self) -> String { let capital = self @@ -181,37 +173,35 @@ impl Entity { )); // ── Metadata section - out.push_str(&indent(0, "├─ metadata\n")); + out.push_str(&indent(0, &format!("├─ {}\n", "metadata".green()))); out.push_str(&indent( 1, - &format!("├─ position: {}\n", self.metadata.position.to_symbol()), + &format!( + "├─ {}: {}\n", + "position".bright_green(), + self.metadata.position.to_symbol() + ), )); out.push_str(&indent( 1, - &format!("├─ capital: {:?}\n", self.metadata.capital), + &format!( + "├─ {}: {:?}\n", + "capital".bright_green(), + self.metadata.capital + ), )); out.push_str(&indent( 1, - &format!("└─ prestige: {}\n", self.metadata.prestige), - )); - - // ── Other top‑level fields - out.push_str(&indent( - 0, - &format!("├─ duration: {}\n", self.duration.to_symbol().magenta()), - )); - out.push_str(&indent( - 0, - &format!("├─ effect_nature: {:?}\n", self.effect_nature), - )); - out.push_str(&indent( - 0, - &format!("├─ effect_bounds: {}\n", self.effect_bounds.to_symbol()), + &format!( + "└─ {}: {}\n", + "prestige".bright_green(), + self.metadata.prestige + ), )); // ── Optional links if !self.metadata.links.is_empty() { - out.push_str(&indent(0, "├─ links\n")); + out.push_str(&indent(0, &format!("├─ {}\n", "links".green()))); for (i, link) in self.metadata.links.iter().enumerate() { let last = i == self.metadata.links.len() - 1; let symbol = if last { "└─" } else { "├─" }; @@ -221,11 +211,26 @@ impl Entity { )); } } - - // ── Entity type again at the end (if you want it back here) + // ── Other top‑level fields out.push_str(&indent( 0, - &format!("└─ entity_type: {}", self.entity_type.to_shortest()), + &format!( + "├─ {}: {}\n", + "duration".green(), + self.duration.to_symbol().yellow() + ), + )); + out.push_str(&indent( + 0, + &format!("├─ {}: {:?}\n", "effect_nature".green(), self.effect_nature), + )); + out.push_str(&indent( + 0, + &format!( + "└─ {}: {}", + "effect_bounds".green(), + self.effect_bounds.to_symbol() + ), )); out