Remove split char parameter from Point2 and Point3 constructors
This commit is contained in:
@@ -8,11 +8,10 @@ pub struct Playground {
|
||||
}
|
||||
|
||||
impl Playground {
|
||||
const POINT_SPLIT_CHAR: char = ',';
|
||||
const CIRCUITS_TAKE: usize = 3;
|
||||
|
||||
pub fn new(connections: Option<usize>) -> Playground {
|
||||
Playground {
|
||||
pub fn new(connections: Option<usize>) -> Self {
|
||||
Self {
|
||||
connections: connections.unwrap_or(1000),
|
||||
}
|
||||
}
|
||||
@@ -21,7 +20,7 @@ impl Playground {
|
||||
fn junction_boxes<R: BufRead>(reader: R) -> Vec<Point3> {
|
||||
let mut junction_boxes = Vec::new();
|
||||
for line in reader.lines().map_while(Result::ok) {
|
||||
junction_boxes.push(Point3::from_line(&line, Self::POINT_SPLIT_CHAR));
|
||||
junction_boxes.push(Point3::from_line(&line));
|
||||
}
|
||||
junction_boxes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user