Skip to content

Commit 80b77c6

Browse files
committed
Use the default trait
1 parent bb7bc76 commit 80b77c6

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

crates/bitwarden-exporters/src/cxf/identity.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -228,32 +228,20 @@ pub fn drivers_license_to_identity(
228228
};
229229

230230
let identity = Identity {
231-
title: None,
232231
first_name,
233-
middle_name: None,
234232
last_name,
235-
address1: None,
236-
address2: None,
237-
address3: None,
238-
city: None,
239233
// Map territory (state/province) to state field
240234
state: drivers_license
241235
.territory
242236
.as_ref()
243237
.map(|t| t.value.0.clone()),
244-
postal_code: None,
245238
// Map country to country field
246239
country: drivers_license.country.as_ref().map(|c| c.value.0.clone()),
247-
company: None, // According to mapping doc, issuingAuthority should be CustomField
248-
email: None,
249-
phone: None,
250-
ssn: None,
251-
username: None,
252-
passport_number: None,
253240
license_number: drivers_license
254241
.license_number
255242
.as_ref()
256243
.map(|l| l.value.0.clone()),
244+
..Default::default()
257245
};
258246

259247
// Create custom fields for unmapped data according to CXF mapping document

crates/bitwarden-exporters/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ pub enum SecureNoteType {
280280
}
281281

282282
#[allow(missing_docs)]
283-
#[derive(Clone)]
283+
#[derive(Clone, Default)]
284284
pub struct Identity {
285285
pub title: Option<String>,
286286
pub first_name: Option<String>,

0 commit comments

Comments
 (0)