Day 15 (tiny refactor)
This commit is contained in:
parent
ea1bbcc089
commit
7ff46b8f99
|
@ -32,7 +32,7 @@ impl Direction {
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Map<T>
|
pub struct Map<T>
|
||||||
where
|
where
|
||||||
T: Copy + Display,
|
T: Copy,
|
||||||
{
|
{
|
||||||
pub map: Vec<Vec<T>>,
|
pub map: Vec<Vec<T>>,
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ impl Map<char> {
|
||||||
|
|
||||||
impl<T> Map<T>
|
impl<T> Map<T>
|
||||||
where
|
where
|
||||||
T: Copy + Display,
|
T: Copy,
|
||||||
{
|
{
|
||||||
pub fn from_2d_vec(map: Vec<Vec<T>>) -> Self {
|
pub fn from_2d_vec(map: Vec<Vec<T>>) -> Self {
|
||||||
Self { map }
|
Self { map }
|
||||||
|
|
Loading…
Reference in New Issue