Limited public visibility of certain fn's to within the crate only.
This commit is contained in:
parent
b5633ccb56
commit
2351db6838
|
@ -169,7 +169,7 @@ pub fn inv_costing_from_cmd_arg(arg: String) -> Result<InventoryCostingMethod, &
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn elect_like_kind_treatment(cutoff_date_arg: &Option<String>) -> Result<(bool, String), Box<dyn Error>> {
|
pub(crate) fn elect_like_kind_treatment(cutoff_date_arg: &Option<String>) -> Result<(bool, String), Box<dyn Error>> {
|
||||||
|
|
||||||
match cutoff_date_arg {
|
match cutoff_date_arg {
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ pub struct ImportProcessParameters {
|
||||||
pub lk_cutoff_date_string: String,
|
pub lk_cutoff_date_string: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn import_and_process_final(
|
pub(crate) fn import_and_process_final(
|
||||||
input_file_path: PathBuf,
|
input_file_path: PathBuf,
|
||||||
settings: &ImportProcessParameters,
|
settings: &ImportProcessParameters,
|
||||||
) -> Result<(
|
) -> Result<(
|
||||||
|
@ -87,7 +87,7 @@ pub fn import_and_process_final(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn import_from_csv(
|
pub(crate) fn import_from_csv(
|
||||||
import_file_path: PathBuf,
|
import_file_path: PathBuf,
|
||||||
transactions_map: &mut HashMap<u32, Transaction>,
|
transactions_map: &mut HashMap<u32, Transaction>,
|
||||||
action_records: &mut HashMap<u32, ActionRecord>,
|
action_records: &mut HashMap<u32, ActionRecord>,
|
||||||
|
|
|
@ -14,7 +14,7 @@ use crate::account::{Account, RawAccount, Lot, Movement};
|
||||||
use crate::core_functions::{InventoryCostingMethod, LikeKindSettings, ImportProcessParameters};
|
use crate::core_functions::{InventoryCostingMethod, LikeKindSettings, ImportProcessParameters};
|
||||||
use crate::decimal_utils::{round_d128_1e8};
|
use crate::decimal_utils::{round_d128_1e8};
|
||||||
|
|
||||||
pub fn create_lots_and_movements(
|
pub(crate) fn create_lots_and_movements(
|
||||||
txns_map: HashMap<u32, Transaction>,
|
txns_map: HashMap<u32, Transaction>,
|
||||||
settings: &ImportProcessParameters,
|
settings: &ImportProcessParameters,
|
||||||
likekind_settings: &Option<LikeKindSettings>,
|
likekind_settings: &Option<LikeKindSettings>,
|
||||||
|
|
|
@ -15,7 +15,7 @@ use crate::account::{Account, RawAccount};
|
||||||
use crate::decimal_utils::{round_d128_1e8};
|
use crate::decimal_utils::{round_d128_1e8};
|
||||||
|
|
||||||
|
|
||||||
pub fn import_accounts(
|
pub(crate) fn import_accounts(
|
||||||
rdr: &mut csv::Reader<File>,
|
rdr: &mut csv::Reader<File>,
|
||||||
raw_acct_map: &mut HashMap<u16, RawAccount>,
|
raw_acct_map: &mut HashMap<u16, RawAccount>,
|
||||||
acct_map: &mut HashMap<u16, Account>,
|
acct_map: &mut HashMap<u16, Account>,
|
||||||
|
@ -113,7 +113,7 @@ pub fn import_accounts(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn import_transactions(
|
pub(crate) fn import_transactions(
|
||||||
rdr: &mut csv::Reader<File>,
|
rdr: &mut csv::Reader<File>,
|
||||||
txns_map: &mut HashMap<u32, Transaction>,
|
txns_map: &mut HashMap<u32, Transaction>,
|
||||||
action_records: &mut HashMap<u32, ActionRecord>,
|
action_records: &mut HashMap<u32, ActionRecord>,
|
||||||
|
|
|
@ -12,7 +12,7 @@ use crate::account::{Account, RawAccount};
|
||||||
use crate::decimal_utils::{round_d128_1e2};
|
use crate::decimal_utils::{round_d128_1e2};
|
||||||
use crate::core_functions::{ImportProcessParameters};
|
use crate::core_functions::{ImportProcessParameters};
|
||||||
|
|
||||||
pub fn add_cost_basis_to_movements(
|
pub(crate) fn add_cost_basis_to_movements(
|
||||||
settings: &ImportProcessParameters,
|
settings: &ImportProcessParameters,
|
||||||
ars: &HashMap<u32, ActionRecord>,
|
ars: &HashMap<u32, ActionRecord>,
|
||||||
raw_acct_map: &HashMap<u16, RawAccount>,
|
raw_acct_map: &HashMap<u16, RawAccount>,
|
||||||
|
@ -187,7 +187,7 @@ pub fn add_cost_basis_to_movements(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_proceeds_to_movements(
|
pub(crate) fn add_proceeds_to_movements(
|
||||||
ars: &HashMap<u32, ActionRecord>,
|
ars: &HashMap<u32, ActionRecord>,
|
||||||
raw_acct_map: &HashMap<u16, RawAccount>,
|
raw_acct_map: &HashMap<u16, RawAccount>,
|
||||||
acct_map: &HashMap<u16, Account>,
|
acct_map: &HashMap<u16, Account>,
|
||||||
|
@ -261,7 +261,7 @@ pub fn add_proceeds_to_movements(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn apply_like_kind_treatment(
|
pub(crate) fn apply_like_kind_treatment(
|
||||||
cutoff_date: NaiveDate,
|
cutoff_date: NaiveDate,
|
||||||
settings: &ImportProcessParameters,
|
settings: &ImportProcessParameters,
|
||||||
ars: &HashMap<u32, ActionRecord>,
|
ars: &HashMap<u32, ActionRecord>,
|
||||||
|
|
Loading…
Reference in New Issue