diff options
Diffstat (limited to 'src/database.rs')
-rw-r--r-- | src/database.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/database.rs b/src/database.rs index 1dac44f..ac5ef3b 100644 --- a/src/database.rs +++ b/src/database.rs @@ -12,6 +12,14 @@ pub struct Repo { updated_at: Option<String>, } +impl Repo { + pub fn description(&self) -> &str { + self.description + .as_deref() + .unwrap_or("") + } +} + impl From<&github::Repo> for Repo { fn from(repo: &github::Repo) -> Self { Self { |