Reformat(All) - Reformats the code
This commit is contained in:
parent
ee24bdd0af
commit
fc5cce934a
|
|
@ -18,10 +18,11 @@ script = [
|
|||
"twine upload releases/xiv_csolver_lib*.whl --repository gitea",
|
||||
]
|
||||
|
||||
[tasks.format]
|
||||
install_crate = "rustfmt"
|
||||
command = "cargo"
|
||||
args = ["fmt", "--", "--emit=files"]
|
||||
[tasks.fmt]
|
||||
script_runner = "@shell"
|
||||
script = [
|
||||
"cargo +nightly fmt -- --config format_code_in_doc_comments=true"
|
||||
]
|
||||
|
||||
[tasks.testcov]
|
||||
script_runner = "@shell"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
reorder_imports = true
|
||||
reorder_imports = true
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
//!
|
||||
//! All actions are defined as Action, containing all methods to actively use it in a craft
|
||||
//! while ActionBuilder is used only initally as a lazy_static setup
|
||||
//!
|
||||
|
||||
use crate::craft::Craft;
|
||||
use crate::specs::{Buff, Success};
|
||||
|
|
@ -45,10 +44,10 @@ impl ActionBuilder {
|
|||
/// use xiv_csolver_lib::action::ActionBuilder;
|
||||
/// use xiv_csolver_lib::specs::Buff;
|
||||
/// ActionBuilder::new("Muscle Memory")
|
||||
/// .cp(6)
|
||||
/// .progress(300)
|
||||
/// .buff(Some((Buff::MuscleMemory, 5)))
|
||||
/// .build();
|
||||
/// .cp(6)
|
||||
/// .progress(300)
|
||||
/// .buff(Some((Buff::MuscleMemory, 5)))
|
||||
/// .build();
|
||||
/// ```
|
||||
pub fn new(name: &str) -> Self {
|
||||
let mut short_name = name.to_string();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
//! A craft represent the state of the recipe with a vector of actions applied to it.
|
||||
//! Applying actions to it will make the craft progress, while branching and trying other actions
|
||||
//! will be done by cloning
|
||||
//!
|
||||
|
||||
use crate::action::Action;
|
||||
use crate::specs::{Buff, BuffState, Recipe, Stats, Success};
|
||||
|
|
|
|||
22
src/io.rs
22
src/io.rs
|
|
@ -239,21 +239,21 @@ fn xiv_csolver_lib(_py: Python, m: &PyModule) -> PyResult<()> {
|
|||
/// [`default`](crate::io::SolverResult::default)
|
||||
/// ```
|
||||
/// # use xiv_csolver_lib::io::SolverResult;
|
||||
/// SolverResult{
|
||||
/// SolverResult {
|
||||
/// steps: 0,
|
||||
/// progression: 0,
|
||||
/// quality: 0,
|
||||
/// durability: 0,
|
||||
/// total_progression: 0,
|
||||
/// total_quality: 0,
|
||||
/// total_durability: 0,
|
||||
/// actions: vec!["Act1".to_string(), "Act2".to_string()],
|
||||
/// step1_solutions: 0,
|
||||
/// step2_solutions: 0,
|
||||
/// found_100_percent: false,
|
||||
/// cp: 0,
|
||||
/// total_cp: 0,
|
||||
/// };
|
||||
/// total_progression: 0,
|
||||
/// total_quality: 0,
|
||||
/// total_durability: 0,
|
||||
/// actions: vec!["Act1".to_string(), "Act2".to_string()],
|
||||
/// step1_solutions: 0,
|
||||
/// step2_solutions: 0,
|
||||
/// found_100_percent: false,
|
||||
/// cp: 0,
|
||||
/// total_cp: 0,
|
||||
/// };
|
||||
/// ```
|
||||
#[cfg(not(feature = "no_python"))]
|
||||
#[pyfunction]
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ pub fn next_action_picker_1<'a>(craft: &Craft<'a>) -> Vec<Option<&'a Action>> {
|
|||
|
||||
// Prune some actions if not requested by --long
|
||||
if craft.step_count == 2 {
|
||||
return action_vec![/*ACTIONS.waste_not, ACTIONS.waste_not_ii, */ ACTIONS.veneration];
|
||||
return action_vec![/* ACTIONS.waste_not, ACTIONS.waste_not_ii, */ ACTIONS.veneration];
|
||||
}
|
||||
if craft.step_count == 3 {
|
||||
available_actions.append(&mut action_vec![
|
||||
ACTIONS.waste_not_ii /*,ACTIONS.waste_not*/
|
||||
ACTIONS.waste_not_ii /* ,ACTIONS.waste_not */
|
||||
])
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in New Issue