From 0ec2a4408294478a5173b54ea48ab6746757c14a Mon Sep 17 00:00:00 2001 From: mxve <68632137+mxve@users.noreply.github.com> Date: Wed, 30 Aug 2023 12:46:13 +0200 Subject: [PATCH] github::latest -> latest_tag --- src/github.rs | 4 ++-- src/iw4x.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/github.rs b/src/github.rs index b26b23f..4383f6b 100644 --- a/src/github.rs +++ b/src/github.rs @@ -1,6 +1,6 @@ use semver::Version; -pub fn latest(owner: &str, repo: &str) -> String { +pub fn latest_tag(owner: &str, repo: &str) -> String { let github_body = crate::http::get_body_string( format!( "https://api.github.com/repos/{}/{}/releases/latest", @@ -15,7 +15,7 @@ pub fn latest(owner: &str, repo: &str) -> String { } pub fn latest_version(owner: &str, repo: &str) -> Version { - Version::parse(&latest(owner, repo)).unwrap() + Version::parse(&latest_tag(owner, repo)).unwrap() } pub fn latest_release_url(owner: &str, repo: &str) -> String { diff --git a/src/iw4x.rs b/src/iw4x.rs index ff33554..047ff08 100644 --- a/src/iw4x.rs +++ b/src/iw4x.rs @@ -14,7 +14,7 @@ pub fn local_revision(dir: &Path) -> u16 { } pub fn remote_revision() -> u16 { - misc::rev_to_int(&github::latest(GH_IW4X_OWNER, GH_IW4X_REPO)) + misc::rev_to_int(&github::latest_tag(GH_IW4X_OWNER, GH_IW4X_REPO)) } pub fn update_available(dir: &Path) -> bool { @@ -36,7 +36,7 @@ pub fn update(dir: &Path) { ); fs::write( dir.join(".iw4xrevision"), - github::latest(GH_IW4X_OWNER, GH_IW4X_REPO), + github::latest_tag(GH_IW4X_OWNER, GH_IW4X_REPO), ) .unwrap(); }