Skip to content

Commit

Permalink
Remove redundant impl Display for OneOrMany (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver E. Anderson committed Feb 10, 2022
1 parent b56f954 commit 4c90d14
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions identity-core/src/common/one_or_many.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

use core::fmt::Debug;
use core::fmt::Display;
use core::fmt::Formatter;

use core::hash::Hash;
Expand Down Expand Up @@ -114,19 +113,6 @@ where
}
}

impl<T> Display for OneOrMany<T>
where
T: Display,
Vec<T>: Display,
{
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
match self {
Self::One(inner) => Display::fmt(inner, f),
Self::Many(inner) => Display::fmt(inner, f),
}
}
}

impl<T> Deref for OneOrMany<T> {
type Target = [T];

Expand Down

0 comments on commit 4c90d14

Please sign in to comment.