replacement in importers/vr-bank/src/lib.rs at line 92
[5.2329]→[5.2329:2411](∅→∅) − fn account(&self, _file: &camino::Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/vr-bank/src/lib.rs at line 96
[5.2468]→[5.2468:2551](∅→∅) − fn date(&self, file: &camino::Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in importers/vr-bank/src/lib.rs at line 98
[5.2573]→[5.2573:2603](∅→∅) replacement in importers/vr-bank/src/lib.rs at line 104
[5.2702]→[5.2702:2735](∅→∅) − file: &camino::Utf8Path,
replacement in importers/vr-bank/src/lib.rs at line 108
[5.2836]→[5.2836:2879](∅→∅) − .extract(file, existing, self)
+ .extract(buffer, existing, self)
replacement in importers/vr-bank/src/lib.rs at line 112
[5.2926]→[5.2926:3016](∅→∅) − fn filename(&self, _file: &camino::Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/vr-bank/src/lib.rs at line 116
[5.3074]→[5.3074:3153](∅→∅) − fn identify(&self, file: &camino::Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
replacement in importers/vr-bank/src/lib.rs at line 140
[5.3844]→[5.3844:3890](∅→∅) − .identify(file, EXPECTED_HEADERS)
+ .identify(buffer, EXPECTED_HEADERS)
edit in importers/vr-bank/Cargo.toml at line 17
[5.9918]→[5.9918:9950](∅→∅) − camino.workspace = true
replacement in importers/uniondepot/src/lib.rs at line 115
[5.3113]→[5.3113:3195](∅→∅) − fn account(&self, _file: &camino::Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/uniondepot/src/lib.rs at line 119
[5.3257]→[5.3257:3340](∅→∅) − fn date(&self, file: &camino::Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in importers/uniondepot/src/lib.rs at line 121
[5.3362]→[5.3362:3392](∅→∅) replacement in importers/uniondepot/src/lib.rs at line 127
[5.3491]→[5.3491:3524](∅→∅) − file: &camino::Utf8Path,
replacement in importers/uniondepot/src/lib.rs at line 131
[5.3625]→[5.3625:3668](∅→∅) − .extract(file, existing, self)
+ .extract(buffer, existing, self)
replacement in importers/uniondepot/src/lib.rs at line 135
[5.3715]→[5.3715:3805](∅→∅) − fn filename(&self, _file: &camino::Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/uniondepot/src/lib.rs at line 139
[5.3863]→[5.3863:3942](∅→∅) − fn identify(&self, file: &camino::Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
replacement in importers/uniondepot/src/lib.rs at line 153
[5.4251]→[5.4251:4297](∅→∅) − .identify(file, EXPECTED_HEADERS)
+ .identify(buffer, EXPECTED_HEADERS)
edit in importers/uniondepot/Cargo.toml at line 17
[5.14325]→[5.14325:14357](∅→∅) − camino.workspace = true
replacement in importers/paypal/src/lib.rs at line 201
[5.6643]→[5.6643:6717](∅→∅) − fn account(&self, _file: &Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _file: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/paypal/src/lib.rs at line 205
[5.6782]→[5.6782:6857](∅→∅) − fn date(&self, file: &Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, file: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in importers/paypal/src/lib.rs at line 211
[5.6977]→[5.6977:7008](∅→∅),
[5.7008]→[5.7008:7033](∅→∅),
[5.7033]→[5.7033:7112](∅→∅) − fn extract(
− &self,
− file: &Utf8Path,
− existing: &[Directive],
− ) -> Result<Vec<Directive>, Self::Error> {
+ fn extract(&self, file: &[u8], existing: &[Directive]) -> Result<Vec<Directive>, Self::Error> {
replacement in importers/paypal/src/lib.rs at line 217
[5.8518]→[5.8518:8600](∅→∅) − fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _file: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/paypal/src/lib.rs at line 221
[5.8658]→[5.8658:8729](∅→∅) − fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, file: &[u8]) -> Result<bool, Self::Error> {
edit in importers/paypal/src/lib.rs at line 514
resolve order conflict in importers/paypal/src/lib.rs at line 514
edit in importers/paypal/Cargo.toml at line 14
[5.15212]→[5.15212:15244](∅→∅) − camino.workspace = true
replacement in importers/fidor/src/lib.rs at line 143
[5.3693]→[5.3693:3775](∅→∅) − fn account(&self, _file: &camino::Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/fidor/src/lib.rs at line 147
[5.3832]→[5.3832:3915](∅→∅) − fn date(&self, file: &camino::Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in importers/fidor/src/lib.rs at line 149
[5.3937]→[5.3937:3967](∅→∅) replacement in importers/fidor/src/lib.rs at line 155
[5.4066]→[5.4066:4099](∅→∅) − file: &camino::Utf8Path,
replacement in importers/fidor/src/lib.rs at line 159
[5.4200]→[5.4200:4243](∅→∅) − .extract(file, existing, self)
+ .extract(buffer, existing, self)
replacement in importers/fidor/src/lib.rs at line 163
[5.4290]→[5.4290:4380](∅→∅) − fn filename(&self, _file: &camino::Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/fidor/src/lib.rs at line 167
[5.4438]→[5.4438:4517](∅→∅) − fn identify(&self, file: &camino::Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
replacement in importers/fidor/src/lib.rs at line 171
[5.4635]→[5.4635:4681](∅→∅) − .identify(file, EXPECTED_HEADERS)
+ .identify(buffer, EXPECTED_HEADERS)
edit in importers/fidor/Cargo.toml at line 17
[5.15473]→[5.15473:15505](∅→∅) − camino.workspace = true
edit in importers/ecus/src/lib.rs at line 12
edit in importers/ecus/src/lib.rs at line 23
replacement in importers/ecus/src/lib.rs at line 63
[5.1723]→[5.1723:1797](∅→∅) − fn account(&self, _file: &Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/ecus/src/lib.rs at line 67
− fn date(&self, file: &Utf8Path) -> Option<Result<Date, Self::Error>> {
− let ecus_transactions = {
− std::fs::read_to_string(file)
− .into_diagnostic()
− .and_then(|data| {
− serde_json::from_str::<Vec<EcusTransaction>>(&data).into_diagnostic()
− })
− };
− let ecus_transactions = match ecus_transactions {
+ fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
+ let ecus_transactions: Vec<EcusTransaction> = match serde_json::from_slice(buffer) {
replacement in importers/ecus/src/lib.rs at line 70
− Err(error) => return Some(Err(error)),
+ Err(error) => return Some(Err(error).into_diagnostic()),
replacement in importers/ecus/src/lib.rs at line 82
[5.1851]→[5.1851:1876](∅→∅) replacement in importers/ecus/src/lib.rs at line 85
[5.1956]→[5.1956:2155](∅→∅) − let ecus_transactions: Vec<EcusTransaction> = {
− let data = std::fs::read_to_string(file).into_diagnostic()?;
− serde_json::from_str(&data).into_diagnostic()?
− };
+ let ecus_transactions: Vec<EcusTransaction> =
+ serde_json::from_slice(buffer).into_diagnostic()?;
replacement in importers/ecus/src/lib.rs at line 114
[5.3186]→[5.3186:3276](∅→∅) − warn!(%location, "ignoring transaction at unknown location");
+ tracing::warn!(%location, "ignoring transaction at unknown location");
replacement in importers/ecus/src/lib.rs at line 150
− fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
edit in importers/ecus/src/lib.rs at line 153
[5.4517]→[5.4517:4518](∅→∅),
[5.4518]→[2.893:1033](∅→∅) −
− fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error> {
− let data = std::fs::read_to_string(file).into_diagnostic()?;
replacement in importers/ecus/src/lib.rs at line 154
[2.1034]→[2.1034:1102](∅→∅) − match serde_json::from_str::<Vec<EcusTransaction>>(&data) {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
+ match serde_json::from_slice::<Vec<EcusTransaction>>(buffer) {
replacement in importers/ecus/src/lib.rs at line 157
[2.1133]→[2.1133:1301](∅→∅) − Err(error) => {
− tracing::debug!(?error, %file, data, "ignoring file due to deserialization error");
− Ok(false)
− }
replacement in importers/ebase/src/transactions.rs at line 149
[5.3077]→[5.3077:3168](∅→∅) − fn account(&self, _file: &Utf8Path) -> Result<beancount_types::Account, Self::Error> {
+ fn account(&self, _file: &[u8]) -> Result<beancount_types::Account, Self::Error> {
replacement in importers/ebase/src/transactions.rs at line 153
[5.3234]→[5.3234:3309](∅→∅) − fn date(&self, file: &Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, file: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in importers/ebase/src/transactions.rs at line 159
[5.3429]→[5.3429:3460](∅→∅),
[5.3460]→[5.3460:3485](∅→∅),
[5.3485]→[5.3485:3564](∅→∅) − fn extract(
− &self,
− file: &Utf8Path,
− existing: &[Directive],
− ) -> Result<Vec<Directive>, Self::Error> {
+ fn extract(&self, file: &[u8], existing: &[Directive]) -> Result<Vec<Directive>, Self::Error> {
replacement in importers/ebase/src/transactions.rs at line 165
[5.3671]→[5.3671:3753](∅→∅) − fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _file: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/ebase/src/transactions.rs at line 169
[5.3811]→[5.3811:3882](∅→∅) − fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, file: &[u8]) -> Result<bool, Self::Error> {
edit in importers/ebase/src/transactions.rs at line 784
resolve order conflict in importers/ebase/src/transactions.rs at line 784
replacement in importers/ebase/src/balances.rs at line 118
[5.27659]→[5.27659:27750](∅→∅) − fn account(&self, _file: &Utf8Path) -> Result<beancount_types::Account, Self::Error> {
+ fn account(&self, _file: &[u8]) -> Result<beancount_types::Account, Self::Error> {
replacement in importers/ebase/src/balances.rs at line 122
[5.27815]→[5.27815:27890](∅→∅) − fn date(&self, file: &Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, file: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in importers/ebase/src/balances.rs at line 128
[5.28010]→[5.28010:28041](∅→∅),
[5.28041]→[5.28041:28066](∅→∅),
[5.28066]→[5.28066:28145](∅→∅) − fn extract(
− &self,
− file: &Utf8Path,
− existing: &[Directive],
− ) -> Result<Vec<Directive>, Self::Error> {
+ fn extract(&self, file: &[u8], existing: &[Directive]) -> Result<Vec<Directive>, Self::Error> {
replacement in importers/ebase/src/balances.rs at line 134
[5.28252]→[5.28252:28334](∅→∅) − fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _file: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/ebase/src/balances.rs at line 138
[5.28388]→[5.28388:28459](∅→∅) − fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, file: &[u8]) -> Result<bool, Self::Error> {
edit in importers/ebase/src/balances.rs at line 292
[5.25198]→[5.25198:25220](∅→∅) resolve order conflict in importers/ebase/src/balances.rs at line 292
edit in importers/ebase/Cargo.toml at line 18
[5.33946]→[5.33946:33978](∅→∅) − camino.workspace = true
replacement in importers/csv/src/lib.rs at line 6
− use camino::Utf8Path;
− use camino::Utf8PathBuf;
replacement in importers/csv/src/lib.rs at line 29
edit in importers/csv/src/lib.rs at line 33
− #[snafu(display("error while reading CSV file {file}"))]
− Reading {
− file: Utf8PathBuf,
−
− source: std::io::Error,
− },
replacement in importers/csv/src/lib.rs at line 55
[5.1364]→[5.1364:1458](∅→∅) − pub fn date<R>(&self, file: &Utf8Path, inner: R) -> Option<Result<Date, Error<R::Error>>>
+ pub fn date<R>(&self, buffer: &[u8], inner: R) -> Option<Result<Date, Error<R::Error>>>
edit in importers/csv/src/lib.rs at line 61
[4.21012]→[4.21012:21098](∅→∅) − let data = std::fs::read_to_string(file).context(ReadingSnafu { file })?;
replacement in importers/csv/src/lib.rs at line 62
[4.21099]→[4.21099:21171](∅→∅) − let mut reader = self.builder.from_reader(data.as_bytes());
+ let mut reader = self.builder.from_reader(buffer);
replacement in importers/csv/src/lib.rs at line 94
[4.22374]→[4.22374:22430](∅→∅) − ProcessingSnafu { errors, data }.fail()
+ ProcessingSnafu {
+ errors,
+ data: buffer,
+ }
+ .fail()
replacement in importers/csv/src/lib.rs at line 106
[5.1920]→[5.1920:1945](∅→∅) replacement in importers/csv/src/lib.rs at line 114
[4.22499]→[5.3438:3589](∅→∅),
[5.3438]→[5.3438:3589](∅→∅) − let data = std::fs::read_to_string(file).context(ReadingSnafu { file })?;
−
− let mut reader = self.builder.from_reader(data.as_bytes());
+ let mut reader = self.builder.from_reader(buffer);
replacement in importers/csv/src/lib.rs at line 152
[5.4488]→[4.23746:23798](∅→∅) − ProcessingSnafu { errors, data }.fail()
+ ProcessingSnafu {
+ errors,
+ data: buffer,
+ }
+ .fail()
edit in importers/csv/src/lib.rs at line 159
[4.23814]→[4.23814:24033](∅→∅),
[4.24033]→[5.4540:4550](∅→∅),
[5.4540]→[5.4540:4550](∅→∅) −
− pub fn identify(&self, file: &Utf8Path, expected_headers: &[&str]) -> Result<bool, csv::Error> {
− if !matches!(file.extension(), Some(ext) if ext.eq_ignore_ascii_case("csv")) {
− return Ok(false);
− }
replacement in importers/csv/src/lib.rs at line 160
[4.24035]→[4.24035:24091](∅→∅) − let mut reader = self.builder.from_path(file)?;
+ pub fn identify(&self, buffer: &[u8], expected_headers: &[&str]) -> Result<bool, csv::Error> {
+ let mut reader = self.builder.from_reader(buffer);
replacement in importers/csv/Cargo.toml at line 4
[5.5593]→[5.5593:5668](∅→∅) − authors.workspace = true
− edition.workspace = true
− publish.workspace = true
+ authors.workspace = true
+ edition.workspace = true
+ publish.workspace = true
replacement in importers/csv/Cargo.toml at line 8
[5.5698]→[5.5698:5723](∅→∅) − version.workspace = true
+ version.workspace = true
replacement in importers/csv/Cargo.toml at line 13
[5.5819]→[5.5819:5925](∅→∅) − beancount-types.path = "../../common/beancount-types"
− german-decimal.path = "../../common/german-decimal"
+ beancount-types.path = "../../common/beancount-types"
+ german-decimal.path = "../../common/german-decimal"
replacement in importers/csv/Cargo.toml at line 17
[5.5951]→[5.5951:6022](∅→∅) − camino.workspace = true
− csv.workspace = true
− delegate.workspace = true
+ csv.workspace = true
+ delegate.workspace = true
replacement in importers/csv/Cargo.toml at line 20
[5.6049]→[5.6049:6162](∅→∅) − miette.workspace = true
− serde.workspace = true
− snafu.workspace = true
− tap.workspace = true
− time.workspace = true
+ miette.workspace = true
+ serde.workspace = true
+ snafu.workspace = true
+ tap.workspace = true
+ time.workspace = true
replacement in importers/bw-bank/src/portfolio.rs at line 74
[5.1888]→[5.1888:1970](∅→∅) − fn account(&self, _file: &camino::Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/bw-bank/src/portfolio.rs at line 78
[5.2036]→[5.2036:2119](∅→∅) − fn date(&self, file: &camino::Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in importers/bw-bank/src/portfolio.rs at line 80
[5.2141]→[5.2141:2171](∅→∅) replacement in importers/bw-bank/src/portfolio.rs at line 86
[5.2270]→[5.2270:2303](∅→∅) − file: &camino::Utf8Path,
replacement in importers/bw-bank/src/portfolio.rs at line 90
[5.2404]→[5.2404:2447](∅→∅) − .extract(file, existing, self)
+ .extract(buffer, existing, self)
replacement in importers/bw-bank/src/portfolio.rs at line 94
[5.2494]→[5.2494:2584](∅→∅) − fn filename(&self, _file: &camino::Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/bw-bank/src/portfolio.rs at line 98
[5.2642]→[5.2642:2721](∅→∅) − fn identify(&self, file: &camino::Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
replacement in importers/bw-bank/src/portfolio.rs at line 113
[5.3050]→[5.3050:3096](∅→∅) − .identify(file, EXPECTED_HEADERS)
+ .identify(buffer, EXPECTED_HEADERS)
edit in importers/bw-bank/Cargo.toml at line 18
[5.9367]→[5.9367:9399](∅→∅) − camino.workspace = true
edit in importers/apple/src/transaction_history.rs at line 16
replacement in importers/apple/src/transaction_history.rs at line 73
[5.1832]→[5.1832:1906](∅→∅) − fn account(&self, _file: &Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/apple/src/transaction_history.rs at line 77
[5.1968]→[5.1968:2049](∅→∅) − fn date(&self, file: &Utf8Path) -> Option<Result<time::Date, Self::Error>> {
+ fn date(&self, buffer: &[u8]) -> Option<Result<time::Date, Self::Error>> {
replacement in importers/apple/src/transaction_history.rs at line 79
[5.2071]→[5.2071:2101](∅→∅) replacement in importers/apple/src/transaction_history.rs at line 85
[5.2200]→[5.2200:2225](∅→∅) replacement in importers/apple/src/transaction_history.rs at line 89
[5.2326]→[5.2326:2369](∅→∅) − .extract(file, existing, self)
+ .extract(buffer, existing, self)
replacement in importers/apple/src/transaction_history.rs at line 93
[5.2416]→[5.2416:2498](∅→∅) − fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/apple/src/transaction_history.rs at line 97
[5.2556]→[5.2556:2627](∅→∅) − fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
replacement in importers/apple/src/transaction_history.rs at line 129
[5.3588]→[5.3588:3634](∅→∅) − .identify(file, EXPECTED_HEADERS)
+ .identify(buffer, EXPECTED_HEADERS)
edit in importers/apple/src/store_balance.rs at line 15
[5.8957]→[5.8957:8979](∅→∅) replacement in importers/apple/src/store_balance.rs at line 74
[5.10424]→[5.10424:10498](∅→∅) − fn account(&self, _file: &Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/apple/src/store_balance.rs at line 78
[5.10563]→[5.10563:10638](∅→∅) − fn date(&self, file: &Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in importers/apple/src/store_balance.rs at line 80
[5.10660]→[5.10660:10690](∅→∅) replacement in importers/apple/src/store_balance.rs at line 86
[5.10789]→[5.10789:10814](∅→∅) replacement in importers/apple/src/store_balance.rs at line 90
[5.10916]→[5.10916:10960](∅→∅) − .extract(file, _existing, self)
+ .extract(buffer, _existing, self)
replacement in importers/apple/src/store_balance.rs at line 94
[5.11010]→[5.11010:11092](∅→∅) − fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/apple/src/store_balance.rs at line 98
[5.11151]→[5.11151:11222](∅→∅) − fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
replacement in importers/apple/src/store_balance.rs at line 108
[5.11438]→[5.11438:11484](∅→∅) − .identify(file, EXPECTED_HEADERS)
+ .identify(buffer, EXPECTED_HEADERS)
edit in importers/apple/Cargo.toml at line 18
[5.18631]→[5.18631:18663](∅→∅) − camino.workspace = true
edit in importers/amazon/src/order_history.rs at line 16
replacement in importers/amazon/src/order_history.rs at line 70
[5.1923]→[5.1923:1997](∅→∅) − fn account(&self, _file: &Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/amazon/src/order_history.rs at line 74
[5.2059]→[5.2059:2140](∅→∅) − fn date(&self, file: &Utf8Path) -> Option<Result<time::Date, Self::Error>> {
+ fn date(&self, buffer: &[u8]) -> Option<Result<time::Date, Self::Error>> {
replacement in importers/amazon/src/order_history.rs at line 76
[5.2162]→[5.2162:2192](∅→∅) replacement in importers/amazon/src/order_history.rs at line 82
[5.2291]→[5.2291:2316](∅→∅) replacement in importers/amazon/src/order_history.rs at line 86
[5.2417]→[5.2417:2460](∅→∅) − .extract(file, existing, self)
+ .extract(buffer, existing, self)
replacement in importers/amazon/src/order_history.rs at line 90
[5.2507]→[5.2507:2589](∅→∅) − fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/amazon/src/order_history.rs at line 94
[5.2641]→[5.2641:2712](∅→∅) − fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
replacement in importers/amazon/src/order_history.rs at line 126
[5.3623]→[5.3623:3669](∅→∅) − .identify(file, EXPECTED_HEADERS)
+ .identify(buffer, EXPECTED_HEADERS)
edit in importers/amazon/src/order_history.rs at line 151
[5.4198]→[4.34187:34209](∅→∅),
[4.34209]→[5.4442:4443](∅→∅),
[5.4442]→[5.4442:4443](∅→∅) edit in importers/amazon/src/gift_card_balance.rs at line 16
[5.9038]→[5.9038:9060](∅→∅) replacement in importers/amazon/src/gift_card_balance.rs at line 113
[5.11970]→[5.11970:12044](∅→∅) − fn account(&self, _file: &Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/amazon/src/gift_card_balance.rs at line 117
[5.12109]→[5.12109:12184](∅→∅) − fn date(&self, file: &Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in importers/amazon/src/gift_card_balance.rs at line 119
[5.12206]→[5.12206:12236](∅→∅) replacement in importers/amazon/src/gift_card_balance.rs at line 125
[5.12335]→[5.12335:12360](∅→∅) replacement in importers/amazon/src/gift_card_balance.rs at line 129
[5.12462]→[5.12462:12506](∅→∅) − .extract(file, _existing, self)
+ .extract(buffer, _existing, self)
replacement in importers/amazon/src/gift_card_balance.rs at line 133
[5.12556]→[5.12556:12638](∅→∅) − fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/amazon/src/gift_card_balance.rs at line 137
[5.12706]→[5.12706:12777](∅→∅) − fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
replacement in importers/amazon/src/gift_card_balance.rs at line 141
[5.12878]→[5.12878:12924](∅→∅) − .identify(file, EXPECTED_HEADERS)
+ .identify(buffer, EXPECTED_HEADERS)
edit in importers/amazon/src/digital_items.rs at line 15
[5.18990]→[5.18990:19012](∅→∅) replacement in importers/amazon/src/digital_items.rs at line 67
[5.20230]→[5.20230:20304](∅→∅) − fn account(&self, _file: &Utf8Path) -> Result<Account, Self::Error> {
+ fn account(&self, _buffer: &[u8]) -> Result<Account, Self::Error> {
replacement in importers/amazon/src/digital_items.rs at line 71
[5.20366]→[5.20366:20447](∅→∅) − fn date(&self, file: &Utf8Path) -> Option<Result<time::Date, Self::Error>> {
+ fn date(&self, buffer: &[u8]) -> Option<Result<time::Date, Self::Error>> {
replacement in importers/amazon/src/digital_items.rs at line 73
[5.20469]→[5.20469:20499](∅→∅) replacement in importers/amazon/src/digital_items.rs at line 79
[5.20598]→[5.20598:20623](∅→∅) replacement in importers/amazon/src/digital_items.rs at line 83
[5.20724]→[5.20724:20767](∅→∅) − .extract(file, existing, self)
+ .extract(buffer, existing, self)
replacement in importers/amazon/src/digital_items.rs at line 87
[5.20814]→[5.20814:20896](∅→∅) − fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in importers/amazon/src/digital_items.rs at line 91
[5.20955]→[5.20955:21026](∅→∅) − fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error> {
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error> {
replacement in importers/amazon/src/digital_items.rs at line 144
[5.22706]→[5.22706:22752](∅→∅) − .identify(file, EXPECTED_HEADERS)
+ .identify(buffer, EXPECTED_HEADERS)
edit in importers/amazon/Cargo.toml at line 18
[5.27612]→[5.27612:27644](∅→∅) − camino.workspace = true
edit in framework/src/utilities.rs at line 13
[5.10226]→[5.272:294](∅→∅),
[5.272]→[5.272:294](∅→∅) replacement in framework/src/utilities.rs at line 51
[5.10819]→[5.10819:11147](∅→∅) − fn account(&self, file: &Utf8Path) -> Result<Account, Self::Error>;
− fn date(&self, file: &Utf8Path) -> Option<Result<Date, Self::Error>>;
− fn filename(&self, file: &Utf8Path) -> Option<Result<String, Self::Error>>;
− fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error>;
+ fn account(&self, buffer: &[u8]) -> Result<Account, Self::Error>;
+ fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>>;
+ fn filename(&self, buffer: &[u8]) -> Option<Result<String, Self::Error>>;
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error>;
replacement in framework/src/utilities.rs at line 62
[5.11282]→[5.11282:11315](∅→∅) − file: &camino::Utf8Path,
replacement in framework/src/utilities.rs at line 65
[5.11394]→[5.11394:11460](∅→∅) − let mut directives = self.inner.extract(file, existing)?;
+ let mut directives = self.inner.extract(buffer, existing)?;
replacement in framework/src/utilities.rs at line 158
[5.2121]→[5.2121:2449](∅→∅) − fn account(&self, file: &Utf8Path) -> Result<Account, Self::Error>;
− fn date(&self, file: &Utf8Path) -> Option<Result<Date, Self::Error>>;
− fn filename(&self, file: &Utf8Path) -> Option<Result<String, Self::Error>>;
− fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error>;
+ fn account(&self, buffer: &[u8]) -> Result<Account, Self::Error>;
+ fn date(&self, buffer: &[u8]) -> Option<Result<Date, Self::Error>>;
+ fn filename(&self, buffer: &[u8]) -> Option<Result<String, Self::Error>>;
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error>;
replacement in framework/src/utilities.rs at line 169
[5.2584]→[5.2584:2617](∅→∅) − file: &camino::Utf8Path,
replacement in framework/src/utilities.rs at line 172
[5.2696]→[5.2696:2758](∅→∅) − let directives = self.inner.extract(file, existing)?;
+ let directives = self.inner.extract(buffer, existing)?;
replacement in framework/src/runner.rs at line 173
[5.4153]→[5.4153:4293](∅→∅) − #[tracing::instrument(skip(self))]
− fn identify_file(&self, file: &Utf8Path) -> Option<&dyn ImporterProtocol<Error = ErrorReport>> {
+ #[tracing::instrument(skip(self, buffer))]
+ fn identify_file(&self, buffer: &[u8]) -> Option<&dyn ImporterProtocol<Error = ErrorReport>> {
replacement in framework/src/runner.rs at line 177
[5.4336]→[5.4336:4410](∅→∅) − .find(|importer| importer.identify(file).unwrap_or_default())
+ .find(|importer| importer.identify(buffer).unwrap_or_default())
replacement in framework/src/runner.rs at line 199
[5.5044]→[5.5044:5105](∅→∅) − let Some(importer) = self.identify_file(file) else {
+ let buffer = std::fs::read(file).into_diagnostic()?;
+
+ let Some(importer) = self.identify_file(&buffer) else {
replacement in framework/src/runner.rs at line 206
[5.1140]→[3.260:323](∅→∅) − let destination = archive::file_name(importer, file)?;
+ let destination = archive::file_name(importer, file, &buffer)?;
replacement in framework/src/runner.rs at line 209
[5.5486]→[3.324:391](∅→∅) − .extract(file, &[]) // TODO load existing transactions
+ .extract(&buffer, &[]) // TODO load existing transactions
edit in framework/src/runner/archive.rs at line 16
replacement in framework/src/runner/archive.rs at line 18
[5.1834]→[5.7028:7071](∅→∅),
[5.7028]→[5.7028:7071](∅→∅) − let account = importer.account(file)?;
+ let account = importer.account(buffer)?;
replacement in framework/src/runner/archive.rs at line 20
[5.7072]→[5.7072:7128](∅→∅) − let binding = importer.filename(file).transpose()?;
+ let binding = importer.filename(buffer).transpose()?;
replacement in framework/src/runner/archive.rs at line 25
[5.7227]→[5.7227:7282](∅→∅) − let date = importer.date(file).unwrap_or_else(|| {
+ let date = importer.date(buffer).unwrap_or_else(|| {
edit in framework/src/lib.rs at line 11
[5.8902]→[5.8902:8924](∅→∅) replacement in framework/src/lib.rs at line 21
[5.9028]→[5.9028:9100](∅→∅) − fn account(&self, file: &Utf8Path) -> Result<Account, Self::Error>;
+ fn account(&self, buffer: &[u8]) -> Result<Account, Self::Error>;
replacement in framework/src/lib.rs at line 23
[5.9101]→[5.9101:9177](∅→∅) − fn date(&self, _file: &Utf8Path) -> Option<Result<Date, Self::Error>> {
+ fn date(&self, _buffer: &[u8]) -> Option<Result<Date, Self::Error>> {
replacement in framework/src/lib.rs at line 27
[5.9197]→[5.9197:9331](∅→∅) − fn extract(
− &self,
− file: &Utf8Path,
− existing: &[Directive],
− ) -> Result<Vec<Directive>, Self::Error>;
+ fn extract(&self, buffer: &[u8], existing: &[Directive])
+ -> Result<Vec<Directive>, Self::Error>;
replacement in framework/src/lib.rs at line 30
[5.9332]→[5.9332:9414](∅→∅) − fn filename(&self, _file: &Utf8Path) -> Option<Result<String, Self::Error>> {
+ fn filename(&self, _buffer: &[u8]) -> Option<Result<String, Self::Error>> {
replacement in framework/src/lib.rs at line 34
[5.9434]→[5.9434:9504](∅→∅) − fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error>;
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error>;
replacement in framework/src/lib.rs at line 50
[5.9738]→[5.9738:10178](∅→∅) − fn account(&self, file: &Utf8Path) -> Result<Account, Self::Error>;
− fn date(&self, _file: &Utf8Path) -> Option<Result<Date, Self::Error>>;
− fn extract(&self, file: &Utf8Path, existing: &[Directive]) -> Result<Vec<Directive>, Self::Error>;
− fn filename(&self, file: &Utf8Path) -> Option<Result<String, Self::Error>>;
− fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error>;
+ fn account(&self, buffer: &[u8]) -> Result<Account, Self::Error>;
+ fn date(&self, _buffer: &[u8]) -> Option<Result<Date, Self::Error>>;
+ fn extract(&self, buffer: &[u8], existing: &[Directive]) -> Result<Vec<Directive>, Self::Error>;
+ fn filename(&self, buffer: &[u8]) -> Option<Result<String, Self::Error>>;
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error>;
replacement in framework/src/lib.rs at line 69
[5.10428]→[5.10428:10868](∅→∅) − fn account(&self, file: &Utf8Path) -> Result<Account, Self::Error>;
− fn date(&self, _file: &Utf8Path) -> Option<Result<Date, Self::Error>>;
− fn extract(&self, file: &Utf8Path, existing: &[Directive]) -> Result<Vec<Directive>, Self::Error>;
− fn filename(&self, file: &Utf8Path) -> Option<Result<String, Self::Error>>;
− fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error>;
+ fn account(&self, buffer: &[u8]) -> Result<Account, Self::Error>;
+ fn date(&self, _buffer: &[u8]) -> Option<Result<Date, Self::Error>>;
+ fn extract(&self, buffer: &[u8], existing: &[Directive]) -> Result<Vec<Directive>, Self::Error>;
+ fn filename(&self, buffer: &[u8]) -> Option<Result<String, Self::Error>>;
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error>;
replacement in framework/src/lib.rs at line 88
[5.11118]→[5.11118:11558](∅→∅) − fn account(&self, file: &Utf8Path) -> Result<Account, Self::Error>;
− fn date(&self, _file: &Utf8Path) -> Option<Result<Date, Self::Error>>;
− fn extract(&self, file: &Utf8Path, existing: &[Directive]) -> Result<Vec<Directive>, Self::Error>;
− fn filename(&self, file: &Utf8Path) -> Option<Result<String, Self::Error>>;
− fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error>;
+ fn account(&self, buffer: &[u8]) -> Result<Account, Self::Error>;
+ fn date(&self, _buffer: &[u8]) -> Option<Result<Date, Self::Error>>;
+ fn extract(&self, buffer: &[u8], existing: &[Directive]) -> Result<Vec<Directive>, Self::Error>;
+ fn filename(&self, buffer: &[u8]) -> Option<Result<String, Self::Error>>;
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error>;
replacement in framework/src/lib.rs at line 107
[5.11807]→[5.11807:12247](∅→∅) − fn account(&self, file: &Utf8Path) -> Result<Account, Self::Error>;
− fn date(&self, _file: &Utf8Path) -> Option<Result<Date, Self::Error>>;
− fn extract(&self, file: &Utf8Path, existing: &[Directive]) -> Result<Vec<Directive>, Self::Error>;
− fn filename(&self, file: &Utf8Path) -> Option<Result<String, Self::Error>>;
− fn identify(&self, file: &Utf8Path) -> Result<bool, Self::Error>;
+ fn account(&self, buffer: &[u8]) -> Result<Account, Self::Error>;
+ fn date(&self, _buffer: &[u8]) -> Option<Result<Date, Self::Error>>;
+ fn extract(&self, buffer: &[u8], existing: &[Directive]) -> Result<Vec<Directive>, Self::Error>;
+ fn filename(&self, buffer: &[u8]) -> Option<Result<String, Self::Error>>;
+ fn identify(&self, buffer: &[u8]) -> Result<bool, Self::Error>;
edit in Cargo.toml at line 38
[5.91793636]→[5.91793636:91793667](∅→∅) − iban_validate = "4.0.1"
edit in Cargo.toml at line 97
+
+ [workspace.dependencies.iban_validate]
+ features = ["serde"]
+ version = "4.0.1"
edit in Cargo.lock at line 64
edit in Cargo.lock at line 130
edit in Cargo.lock at line 242
[5.21339]→[5.21339:21350](∅→∅) edit in Cargo.lock at line 474
[5.10005]→[5.10005:10016](∅→∅) edit in Cargo.lock at line 757
edit in Cargo.lock at line 1012
[5.1548]→[5.1548:1559](∅→∅) edit in Cargo.lock at line 1559
edit in Cargo.lock at line 2640
[5.15849]→[5.15849:15860](∅→∅) edit in Cargo.lock at line 4117
[5.15457]→[5.15457:15468](∅→∅) edit in Cargo.lock at line 4211
[5.12898]→[5.12898:12909](∅→∅)