Skip to content

Commit d5b8acd

Browse files
committed
feat(map): relax error type bound for FromStr impl
no longer need for it to be anyhow::Error, just propagate the existing Error type
1 parent 294f6be commit d5b8acd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ impl<T> Map2D<T> {
3030

3131
impl<T> FromStr for Map2D<T>
3232
where
33-
T: TryFrom<char, Error = anyhow::Error>,
33+
T: TryFrom<char>,
3434
{
35-
type Err = anyhow::Error;
35+
type Err = <T as TryFrom<char>>::Error;
3636

3737
fn from_str(s: &str) -> Result<Self, Self::Err> {
3838
let map = s

0 commit comments

Comments
 (0)