🐛 Fixes parsing bw output

This commit is contained in:
2026-07-20 10:41:53 +02:00
parent bfc24d312d
commit c7aacb1df6
3 changed files with 61 additions and 12 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
use crate::sh;
use serde::Deserialize;
use std::io::{Error, ErrorKind, Write, stdin, stdout};
use std::io::{Error, ErrorKind};
const EXECUTABLE: &str = "bw";
@@ -20,7 +20,7 @@ pub struct Item {
pub notes: Option<String>,
pub favorite: bool,
pub fields: Vec<ItemField>,
pub login: Login,
pub login: Option<Login>,
}
#[derive(Deserialize, Clone)]
@@ -41,7 +41,7 @@ pub struct ItemField {
#[derive(Deserialize, Clone)]
pub struct Login {
pub uris: Vec<LoginUri>,
pub username: String,
pub username: Option<String>,
pub password: Option<String>,
pub totp: Option<String>,
#[serde(rename = "passwordRevisionDate")]
@@ -77,7 +77,7 @@ pub struct Fido2Credential {
#[serde(rename = "rpName")]
pub rp_name: String,
#[serde(rename = "userDisplayName")]
pub user_display_name: String,
pub user_display_name: Option<String>,
pub discoverable: String,
#[serde(rename = "creationDate")]
pub creation_date: String,