In cube.rs, the new function initializes as:
.enumerate()
.map(|(i, s)| (*s, i as u16))
Effectively adding the number of the position of the original vec inside as extra info.
While on the from function:
faces: faces.iter().map(|f| (*f, 0)).collect(),
Sets all indices to zero.
As a result, calling cubesim::solve(&cube) will always return None for cubes that are created with the from function instead of new.
This makes impossible to use this library for arbitrary cubes where we don't know the rotations made to get into that position.
In cube.rs, the new function initializes as:
Effectively adding the number of the position of the original vec inside as extra info.
While on the from function:
Sets all indices to zero.
As a result, calling cubesim::solve(&cube) will always return None for cubes that are created with the from function instead of new.
This makes impossible to use this library for arbitrary cubes where we don't know the rotations made to get into that position.