Switch to stable

This commit is contained in:
Dandaedre 2026-07-27 00:03:10 +02:00
parent c5481210d8
commit 70cde5aa52
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
15 changed files with 39 additions and 27 deletions

View File

@ -30,6 +30,16 @@ codegen-units = 256
incremental = true
panic = "abort"
# [profile.dev-analysis]
# inherits = "dev"
# opt-level = 0
# debug = 0
# strip = "none"
# lto = false
# # codegen-units = 256
# incremental = true
# # codegen-backend = "cranelift"
[workspace.dependencies]
config = {path = "./crates/config"}
tablegen = {path = "./crates/tablegen"}

View File

@ -48,7 +48,7 @@ fn init_graph_config(_args: &GraphConfig) -> Result<()> {
/// Load the config if given of the default config if none
fn load_graph_config(args: &GraphConfig) -> Result<MiniTheme> {
if let Some(c) = &args.config {
println!("[INFO] Reading config {}", &c);
println!("[INFO] Reading config {}", c);
let mut f = File::open(c).context("Opening config")?;
let mut buf = String::new();
f.read_to_string(&mut buf).context("Reading the config")?;
@ -104,8 +104,8 @@ fn gen_graph(args: &GraphConfig) -> Result<()> {
let cfg = load_graph_config(args)?;
for graph in csv.values {
let path_svg = format!("{}/{}.svg", args.destination, &graph.name);
let path_png = format!("{}/{}.png", args.destination, &graph.name);
let path_svg = format!("{}/{}.svg", args.destination, graph.name);
let path_png = format!("{}/{}.png", args.destination, graph.name);
println!("[INFO] Processing {}", path_svg);
let mut f = File::create(&path_svg)?;

View File

@ -89,7 +89,7 @@ pub(super) fn make_file(args: &MakeConfig) -> BuilderParseResult {
}
BuilderParseResult {
new_name: format!("{:?}", &path),
new_name: format!("{:?}", path),
chapt_list: chapters,
}
}
@ -301,9 +301,9 @@ pub(super) fn make_clean(args: &MakeConfig) {
for s in list_suff {
// The most ghetto *** I've done so far
// cmd.arg(format!("{}{}", &target, s));
cmd.arg(format!("{}_build{}", &target, s));
cmd.arg(format!("{}_build{}", target, s));
}
cmd.arg(format!("{}_build{}", &target, ".tex"));
cmd.arg(format!("{}_build{}", target, ".tex"));
// println!("{:?}", cmd);
if let Err(e) = cmd.output() {
println!(

View File

@ -43,7 +43,7 @@ pub fn monsters_dispatch(args: &MonsterConfig, config: &Config) -> Result<()> {
// MonsterTarget::Show => unimplemented!("implement show logic"),
MonsterTarget::Balance(ref args) => {
let connection = Connection::open(&args.db.database)
.context(format!("Opening database {}", &args.db.database))?;
.context(format!("Opening database {}", args.db.database))?;
show_balancing_data(args, config, connection)?
}
}

View File

@ -219,8 +219,8 @@ impl DamageCategory {
pub fn from_percent(percent: f64) -> Self {
match percent {
..0.01 => Self::None,
0.01..0.15 => Self::Chip,
0.15..0.5 => Self::Moderate,
0.01..0.25 => Self::Chip,
0.25..0.5 => Self::Moderate,
0.5..0.8 => Self::High,
0.8..1.0 => Self::NearDeath,
1.0..1.5 => Self::Kill,

View File

@ -64,14 +64,14 @@ pub fn generate_monsters_tex(
if args.player || args.all {
println!("Generating Player Bestiaire");
let path = format!("./{}/player_bestiaire.tex", args.destination);
let mut f = File::create(&path).context(format!("Opening file {}", &path))?;
write!(f, "{}", p_out).context(format!("Writing {}", &path))?;
let mut f = File::create(&path).context(format!("Opening file {}", path))?;
write!(f, "{}", p_out).context(format!("Writing {}", path))?;
}
if args.master || args.all {
println!("Generating Master Bestiaire");
let path = format!("./{}/master_bestiaire.tex", args.destination);
let mut f = File::create(&path).context(format!("Opening file {}", &path))?;
write!(f, "{}", m_out).context(format!("Writing {}", &path))?;
let mut f = File::create(&path).context(format!("Opening file {}", path))?;
write!(f, "{}", m_out).context(format!("Writing {}", path))?;
}
Ok(())
}

View File

@ -137,7 +137,7 @@ impl WriteTable for ClassesArray {
continue;
}
if lvl != 0 {
writeln!(buffer, "{}", &config.classes.sep)?;
writeln!(buffer, "{}", config.classes.sep)?;
}
writeln!(buffer, "{}", formatted_tier)?;
for elem in tier {

View File

@ -34,5 +34,8 @@ rayon = "1.12.0"
name = "iter_creation"
harness = false
[features]
dev-analysis = [] # gate for the feature flag
# [lints.rust]
# unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }

View File

@ -30,7 +30,7 @@ where
/// Generate a SELECT query with fields generated from a struct. Returns a SQL request as a String
#[inline]
#[coverage(off)] // INCORRECT: Error with line report
#[cfg_attr(feature = "dev-analysis", coverage(off))] // INCORRECT: Error with line report
fn generate_select_query<T: more_fields::FieldsAsSlice>(
table_name: &str,
filter: Option<&str>,

View File

@ -62,7 +62,7 @@ where
/// A blanket implementation giving all combinaisons of recipes with another RecipeCollection
///
/// This method doesn't make use of parallel iterators as the workload is way faster than would be the memory dispatch
#[coverage(off)] // Tarpaulin cannot deal with iter and long lines
#[cfg_attr(feature = "dev-analysis", coverage(off))] // Tarpaulin cannot deal with iter and long lines
fn combine_all<G>(&mut self, other: &G)
where
G: RecipeCollection<Recipes = Self::Recipes>,
@ -96,7 +96,7 @@ where
fn from_vectored(list: Vec<Self::Recipes>) -> Self;
/// Create a collection from an iterator of intermediate values T
#[coverage(off)] // INCORRECT: Error with line report
#[cfg_attr(feature = "dev-analysis", coverage(off))] // INCORRECT: Error with line report
fn from_iter_intermediate<T>(
iter_inter: impl Iterator<Item = Result<T, FatalEquipementError>>,
) -> Result<Self, FatalEquipementError>
@ -233,7 +233,7 @@ pub trait RecipeDatabase {
}
/// Insert a row inside the database, while mostly unused this function is needed to initialize the empty table with an empty row if needed
#[coverage(off)] // INCORRECT: Error with line report
#[cfg_attr(feature = "dev-analysis", coverage(off))] // INCORRECT: Error with line report
fn insert_row<T: FieldsAsSlice + Serialize>(
&self,
table_name: &str,

View File

@ -2,10 +2,9 @@
// File: weaponry/src/lib.rs
//! Weaponry module, handling all weaponry creation and analysis
#![feature(coverage_attribute)]
// #![feature(int_roundings)]
#![cfg_attr(feature = "dev-analysis", feature(coverage_attribute))]
#![warn(missing_docs, clippy::missing_docs_in_private_items)]
#![feature(iter_intersperse)]
// #![feature(iter_intersperse)]
pub mod analysis;
mod database;

View File

@ -136,7 +136,7 @@ impl Display for InnerEquipementStats {
vec![
self.special
.iter()
.intersperse(&",".to_string())
// .intersperse(&",".to_string())
.fold(String::new(), |res, new| format!("{}; {}", res, new)),
],
);
@ -190,7 +190,7 @@ impl<T> Default for FilterFunction<T> {
}
}
impl<T> PartialEq for FilterFunction<T> {
// #[coverage(off)] // INCORRECT: Error with line report
#[cfg_attr(feature = "dev-analysis", coverage(off))] // INCORRECT: Error with line report
fn eq(&self, _other: &Self) -> bool {
true
}

View File

@ -30,7 +30,7 @@ impl RecipeDatabase for EquipementDatabase {
&self.conn
}
#[coverage(off)] // INCORRECT: Error with line report
#[cfg_attr(feature = "dev-analysis", coverage(off))] // INCORRECT: Error with line report
fn serialize_into_intermediate<T>(
&self,
table: &str,
@ -132,7 +132,7 @@ impl TryFrom<DatabaseEquipementStats> for InnerEquipementStats {
type SubCategories = (Option<WeaponBaseShape>, Option<WeaponBaseSize>);
/// Infer all subcategories from a deserialized DatabaseCategory
#[coverage(off)] // A test would literally be a copy paste of this match
#[cfg_attr(feature = "dev-analysis", coverage(off))] // A test would literally be a copy paste of this match
fn get_sub_categories_from_serde(category: &str) -> Result<SubCategories, FatalEquipementError> {
Ok(if let Some(category) = from_serde!(category)? {
match category {

View File

@ -229,7 +229,7 @@ master_part = '''
\SetCell{c} Res & \slash & \pierce & \blunt & \symceleste & \symfire & \symearth & \symwood & \symmagma & \symabyss & \symwater & \symwind & \symice & \symthunder \\
\hline
{{#each body_parts.body_parts}}
\SetCell{font=\footnotesize} {{{body_part_name}}} & ${{{slash}}} $ & ${{{pierce}}} $ & ${{{blunt}}} $ & ${{{celestial}}} $ & ${{{fire}}} $ & ${{{earth}}} $ & ${{{wood}}} $ & ${{{magma}}} $ & ${{{celeste}}} $ & ${{{water}}} $ & ${{{wind}}} $ & ${{{ice}}} $ & ${{{thunder}}} $ \\
\SetCell{font=\footnotesize} {{{body_part_name}}} & ${{{slash}}} $ & ${{{piercing}}} $ & ${{{blunt}}} $ & ${{{celestial}}} $ & ${{{fire}}} $ & ${{{earth}}} $ & ${{{wood}}} $ & ${{{magma}}} $ & ${{{celeste}}} $ & ${{{water}}} $ & ${{{wind}}} $ & ${{{ice}}} $ & ${{{thunder}}} $ \\
{{/each}}
\end{tblr}
\end{center}

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly"
channel = "stable"