Skip to content

Commit

Permalink
Fix usage warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Oct 18, 2024
1 parent a226607 commit 20bfe68
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/rs/_cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use serve::serve;
use twsearch::_internal::{
cli::options::{get_options, CliCommand, GodsAlgorithmArgs, SearchCommandArgs},
options::VerbosityLevel,
read_to_json, AlwaysValid, ArgumentError, CommandError, GodsAlgorithmSearch, IDFSearch,
read_to_json, ArgumentError, CommandError, GodsAlgorithmSearch, IDFSearch,
IndividualSearchOptions, SearchLogger,
};

Expand Down Expand Up @@ -146,7 +146,7 @@ fn search(search_command_args: SearchCommandArgs) -> Result<(), CommandError> {
}
};

let mut idf_search = IDFSearch::<AlwaysValid>::try_new(
let mut idf_search = <IDFSearch>::try_new(
kpuzzle,
target_pattern,
search_command_args.generator_args.parse(),
Expand Down
8 changes: 8 additions & 0 deletions src/rs/scramble/puzzles/square1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use rand::thread_rng;
use crate::{
_internal::{FlatMoveIndex, PatternValidityChecker},
scramble::{
puzzles::square1_phase_lookup_table::LookupPattern,
randomize::{basic_parity, BasicParity, PieceZeroConstraint},
scramble_search::FilteredSearch,
},
Expand Down Expand Up @@ -183,6 +184,13 @@ pub fn scramble_square1() -> Alg {
);

dbg!(&search_generators.flat[10]);
dbg!(phase_lookup_table.lookup_pattern_to_index.get(
&LookupPattern::try_new::<Phase1Checker>(
&kpuzzle.default_pattern(),
square1_square_square_shape_kpattern(),
)
.unwrap(),
));

// dbg!(wedge_parity(
// &kpuzzle
Expand Down
2 changes: 1 addition & 1 deletion src/rs/scramble/puzzles/square1_phase_lookup_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Debug for LookupPattern {
}

impl LookupPattern {
fn try_new<C: PatternValidityChecker>(
pub fn try_new<C: PatternValidityChecker>(
full_pattern: &KPattern,
phase_mask: &KPattern,
) -> Option<Self> {
Expand Down

0 comments on commit 20bfe68

Please sign in to comment.