Skip to content

Commit 4ae844f

Browse files
committed
feat: add zsync_url method to UpdateInfo
1 parent b069332 commit 4ae844f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/update_info/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,11 @@ impl UpdateInfo {
1717
pub fn parse(s: &str) -> Result<Self> {
1818
parser::parse(s)
1919
}
20+
21+
pub fn zsync_url(&self) -> Result<String> {
22+
match self {
23+
UpdateInfo::Generic(g) => Ok(g.zsync_url().to_owned()),
24+
UpdateInfo::GitHub(g) => g.zsync_url().map(|s| s.to_owned()),
25+
}
26+
}
2027
}

0 commit comments

Comments
 (0)