Skip to content

Commit

Permalink
Add Default directly & remove new() fn
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi3700 committed Oct 31, 2024
1 parent 755c999 commit f8eb467
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,7 @@ pub use todos::*;

pub const API_BASE_URL: &str = "https://dummyjson.com";

#[derive(Default)]
pub struct DummyJsonClient {
pub client: Client,
}

impl DummyJsonClient {
pub fn new() -> Self {
Self { client: Client::new() }
}
}

impl Default for DummyJsonClient {
fn default() -> Self {
Self::new()
}
}

0 comments on commit f8eb467

Please sign in to comment.