Skip to content

Commit 13e4e73

Browse files
committed
remove unnecessary trait impls
1 parent 02b0f3f commit 13e4e73

File tree

2 files changed

+1
-16
lines changed
  • pointercrate-demonlist-api/src
  • pointercrate-demonlist/src

2 files changed

+1
-16
lines changed

pointercrate-demonlist-api/src/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl<'a> FromUriParam<Path, &'a str> for ClientList {
2727
type Target = ClientList;
2828

2929
fn from_uri_param(param: &'a str) -> Self::Target {
30-
ClientList(List::from(param))
30+
ClientList(List::from_str(param).unwrap_or_default())
3131
}
3232
}
3333

pointercrate-demonlist/src/list.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,6 @@ impl Default for List {
3131
}
3232
}
3333

34-
impl From<&str> for List {
35-
fn from(value: &str) -> Self {
36-
List::from_str(value).unwrap_or_default()
37-
}
38-
}
39-
40-
impl From<Option<&str>> for List {
41-
fn from(value: Option<&str>) -> Self {
42-
match value {
43-
Some(list) => List::from(list),
44-
None => List::default(),
45-
}
46-
}
47-
}
48-
4934
impl FromStr for List {
5035
type Err = CoreError;
5136

0 commit comments

Comments
 (0)