Fix sorting between different directives on the same day

korrat
Dec 18, 2023, 1:47 PM
PXR534B2DHOON733XPUNXWZ5HKFHRFMEDU2BJSZSGLCF27AJC7RAC

Dependencies

  • [2] TQMNNOOE Fix clippy warnings
  • [3] 4WYI5U7Y Upgrade dependencies
  • [4] RI7HQBYA Add generator and parser for ISO20022 messages
  • [5] X6YJF46G Respect directive order when writing trees
  • [6] HWT4JVUE Fix clippy warnings
  • [7] YDK6X6PP add a library of important types for beancount
  • [8] D6UTHZA4 add a simple writer for saving a set of directives to a tree of files
  • [9] 2NYDNXH7 Use OS dependent path separator when constructing paths in tree writer
  • [10] 2JBFREZG enable additional warnings
  • [11] 6MYJDQ3I Handle price directives
  • [12] R524JUUE Implement metadata & price directives
  • [*] XQHYMSDY Add importer for Union Investment transactions
  • [*] I2P2FTLE add basic parser for german decimals
  • [*] 6MR76MLL Replace build script with cargo-px
  • [*] 5S4MZHL5 pretty print decimals using icu

Change contents

  • edit in common/beancount-types/src/lib.rs at line 32
    [4.4404]
    [4.5898]
    use enum_kinds::EnumKind;
  • replacement in common/beancount-types/src/lib.rs at line 43
    [4.6315][4.6315:6339]()
    #[derive(Clone, Debug)]
    [4.5996]
    [4.6339]
    #[derive(Clone, Debug, EnumKind)]
    #[enum_kind(DirectiveKind, derive(Hash, Ord, PartialOrd))]
  • edit in common/beancount-types/src/lib.rs at line 74
    [4.6454]
    [4.11469]
    #[must_use]
    pub const fn date(&self) -> Date {
    match self {
    Self::Balance(balance) => balance.date,
    Self::Price(price) => price.date,
    Self::Transaction(transaction) => transaction.date,
    }
    }
  • edit in common/beancount-types/src/lib.rs at line 90
    [4.11676][4.11676:11678]()
    }
  • edit in common/beancount-types/src/lib.rs at line 91
    [4.11679][4.11679:11696]()
    impl Directive {
  • replacement in common/beancount-types/src/lib.rs at line 92
    [4.91793208][2.168:207](),[2.207][4.6487:6560](),[4.272][4.6487:6560](),[4.91793241][4.6487:6560](),[4.6487][4.6487:6560](),[4.6560][4.61:107](),[4.107][4.6560:6634](),[4.6560][4.6560:6634]()
    pub const fn date(&self) -> Date {
    match self {
    Self::Balance(balance) => balance.date,
    Self::Price(price) => price.date,
    Self::Transaction(transaction) => transaction.date,
    }
    [4.91793208]
    [4.6634]
    pub fn kind(&self) -> DirectiveKind {
    DirectiveKind::from(self)
  • edit in common/beancount-types/Cargo.toml at line 13
    [14.14917]
    [14.14917]
    enum-kinds.workspace = true
  • replacement in common/beancount-tree-writer/src/lib.rs at line 92
    [4.294][4.294:345]()
    || left.date().cmp(&right.date()),
    [4.294]
    [4.345]
    || {
    left.date()
    .cmp(&right.date())
    .then_with(|| left.kind().cmp(&right.kind()))
    },
  • edit in Cargo.toml at line 35
    [3.184]
    [16.2856]
    enum-kinds = "0.5.1"
  • edit in Cargo.lock at line 382
    [4.26627]
    [4.26627]
    "enum-kinds",
  • edit in Cargo.lock at line 1157
    [17.14604]
    [17.14604]
    name = "enum-kinds"
    version = "0.5.1"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "4e40a16955681d469ab3da85aaa6b42ff656b3c67b52e1d8d3dd36afe97fd462"
    dependencies = [
    "proc-macro2",
    "quote",
    "syn 1.0.109",
    ]
    [[package]]