Skip to content

Commit

Permalink
chore: format all files
Browse files Browse the repository at this point in the history
  • Loading branch information
leona-ya committed Jul 6, 2024
1 parent be46f73 commit 371ae33
Show file tree
Hide file tree
Showing 31 changed files with 775 additions and 602 deletions.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

22 changes: 9 additions & 13 deletions berechenbarkeit-lib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
use std::{
path::PathBuf,
num::{ParseFloatError, ParseIntError},
fmt,
num::{ParseFloatError, ParseIntError},
path::PathBuf,
};

use clap::Parser;
use serde::Serialize;
use thiserror::Error;
use once_cell::sync::Lazy;
use time::{PrimitiveDateTime, error::ComponentRange};
use serde::Serialize;
use strum::IntoEnumIterator;
use strum_macros::EnumIter;
use vendors::regex::{
METRO, BAUHAUS, IKEA, MEDICALCORNER, MOLTONDISCOUNT, KOKKU, ROHALM
};
use thiserror::Error;
use time::{error::ComponentRange, PrimitiveDateTime};
use vendors::regex::{BAUHAUS, IKEA, KOKKU, MEDICALCORNER, METRO, MOLTONDISCOUNT, ROHALM};

pub mod vendors;

Expand Down Expand Up @@ -47,7 +45,7 @@ pub enum InvoiceVendor {
#[derive(Debug, Clone, Serialize)]
pub enum InvoiceItemType {
Expense,
Credit
Credit,
}

pub enum InvoiceParser {
Expand Down Expand Up @@ -100,7 +98,7 @@ impl fmt::Display for InvoiceVendor {
Self::MedicalCorner => write!(f, "MedicalCorner"),
Self::MoltonDiscount => write!(f, "MoltonDiscount"),
Self::Kokku => write!(f, "Kokku"),
Self::Rohalm => write!(f, "Rohalm")
Self::Rohalm => write!(f, "Rohalm"),
}
}
}
Expand Down Expand Up @@ -129,9 +127,7 @@ impl From<InvoiceVendor> for InvoiceParser {
}

pub fn get_vendors() -> Vec<String> {
InvoiceVendor::iter()
.map(|vendor| vendor.to_string())
.collect()
InvoiceVendor::iter().map(|vendor| vendor.to_string()).collect()
}

pub fn get_parser_for_vendor(vendor: Option<InvoiceVendor>) -> Option<InvoiceParser> {
Expand Down
Loading

0 comments on commit 371ae33

Please sign in to comment.