Skip to content

Commit

Permalink
Fix From implementation for Config, which fixes juhaku#173
Browse files Browse the repository at this point in the history
  • Loading branch information
kellpossible committed Jun 16, 2022
1 parent 37b616d commit 75bfe9d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions utoipa-swagger-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,19 +1056,13 @@ impl<'a> Config<'a> {

impl<'a> From<&'a str> for Config<'a> {
fn from(s: &'a str) -> Self {
Self {
urls: vec![Url::from(s)],
..Default::default()
}
Self::new([s])
}
}

impl From<String> for Config<'_> {
fn from(s: String) -> Self {
Self {
urls: vec![Url::from(s)],
..Default::default()
}
Self::new([s])
}
}

Expand Down

0 comments on commit 75bfe9d

Please sign in to comment.