Added some Display impls to response structs.
[?]
Apr 11, 2021, 12:44 PM
736HJN5EZZL5KLZP52TZQLDFE6ZXWEBLUHTHUE4IZ3EOUE3MNHAACDependencies
- [2]
AZQVIGSMFirst record
Change contents
- edit in src/response.rs at line 9
}impl fmt::Display for Categories {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {let mut s = String::new();for category in &self.categories {s.push_str(&category.to_string());};write!(f, "{}", s)} - edit in src/response.rs at line 20
- edit in src/response.rs at line 32
impl fmt::Display for Category {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {write!(f,"id: {}\nname: {}\nparent_id: {}\nnotes: {:?}\n",self.id,self.name,self.parent_id,self.notes,)}} - edit in src/response.rs at line 70
impl fmt::Display for CategorySeries {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {let mut s = String::new();for (i, series) in self.seriess.iter().enumerate() {s.push_str(&i.to_string());s.push('\n');s.push_str(&series.to_string());s.push('\n');};write!(f, "{}", s)}} - edit in src/response.rs at line 252
impl fmt::Display for TagItem {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {write!(f,"name: {}\ngroup_id: {}\nnotes: {:?}\n",self.name,self.group_id,self.notes,)}} - edit in src/response.rs at line 459
}impl fmt::Display for SeriesTags {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {let mut s = String::new();for (i, tags) in self.tags.iter().enumerate() {s.push_str(&i.to_string());s.push('\n');s.push_str(&tags.to_string());s.push('\n');};write!(f, "{}", s)} - replacement in src/response.rs at line 545
for tag in &self.tags {for (i, tag) in self.tags.iter().enumerate() {tags.push_str(&i.to_string());tags.push('\n'); - edit in src/response.rs at line 569
impl TagsSeries {pub fn series_titles(&self) -> String {let mut s = String::new();for series in &self.seriess {s.push_str(&series.title);s.push('\n');}s}}