Add subcommand 'diff' to compare two OSC files

This commit is contained in:
2023-07-01 17:29:53 +02:00
parent b04ee563f2
commit b030ce6a53
9 changed files with 209 additions and 7 deletions

View File

@@ -25,7 +25,7 @@
use console::style;
use serde::{Deserialize, Serialize};
use crate::model::{Listable, Ordner, Sortable};
use crate::model::{Comparable, Listable, Ordner, Sortable};
#[derive(Serialize, Deserialize, Debug)]
#[serde(deny_unknown_fields)]
@@ -69,6 +69,16 @@ impl Sortable for PropertyCatalogue {
}
}
impl Comparable for PropertyCatalogue {
fn get_name(&self) -> String {
self.name.clone()
}
fn get_revision(&self) -> u16 {
self.revision
}
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct Versions {