Skip to content

Commit

Permalink
use auto derive Default for UnifiSearchInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Crypto-Spartan committed Mar 10, 2024
1 parent 23715a2 commit 02ae527
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/unifi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use zeroize::Zeroize;
//use serde_json::{Value, Result};
//use std::fs;

#[derive(Debug, Clone)]
#[derive(Default, Debug, Clone)]
pub struct UnifiSearchInfo {
pub username: String,
pub password: String,
Expand All @@ -19,18 +19,6 @@ pub struct UnifiSearchInfo {
pub accept_invalid_certs: bool,
}

impl Default for UnifiSearchInfo {
fn default() -> Self {
Self {
username: "".into(),
password: "".into(),
server_url: "".into(),
mac_address: "".into(),
accept_invalid_certs: false,
}
}
}

pub type UnifiSearchResult = Result<UnifiSearchStatus, UnifiSearchError>;
type UnifiLoginResult = Result<Client, ErrorCode>;
type ErrorCode = usize;
Expand Down

0 comments on commit 02ae527

Please sign in to comment.