Make commodities deserializable

korrat
Jan 3, 2023, 6:30 PM
PONTO555H5VQBYTUDG5ZIW5THKIIJ7YBPRQMWZG5PD2JQTEEV52QC

Dependencies

  • [2] YDK6X6PP add a library of important types for beancount
  • [3] 2JBFREZG enable additional warnings

Change contents

  • edit in common/beancount-types/src/commodity.rs at line 10
    [2.8156]
    [2.8156]
    use serde::Deserialize;
  • replacement in common/beancount-types/src/commodity.rs at line 15
    [2.8262][2.8262:8330]()
    #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
    [2.8262]
    [2.8330]
    #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd)]
    #[serde(try_from = "String")]
  • edit in common/beancount-types/src/commodity.rs at line 46
    [2.8522]
    [2.8522]
    }
    }
    impl From<&Self> for Commodity {
    fn from(value: &Self) -> Self {
    *value