format the rust sources and split the functions that pushed over the line
This commit is contained in:
@@ -4,8 +4,7 @@ use anyhow::{bail, Context, Result};
|
||||
use futures_util::StreamExt;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
const GITEA_LATEST: &str =
|
||||
"https://git.lashman.live/api/v1/repos/lashman/bytesize/releases/latest";
|
||||
const GITEA_LATEST: &str = "https://git.lashman.live/api/v1/repos/lashman/bytesize/releases/latest";
|
||||
|
||||
/// Everything the updater will fetch has to live under this prefix. The download
|
||||
/// URL arrives from the frontend, and an unconstrained one there would let
|
||||
@@ -61,7 +60,12 @@ pub(crate) async fn check_for_update() -> Result<Option<UpdateInfo>> {
|
||||
.assets
|
||||
.iter()
|
||||
.find(|a| a.name.eq_ignore_ascii_case("ByteSize.exe"))
|
||||
.or_else(|| release.assets.iter().find(|a| a.name.to_lowercase().ends_with(".exe")))
|
||||
.or_else(|| {
|
||||
release
|
||||
.assets
|
||||
.iter()
|
||||
.find(|a| a.name.to_lowercase().ends_with(".exe"))
|
||||
})
|
||||
.map(|a| a.browser_download_url.clone());
|
||||
Ok(Some(UpdateInfo {
|
||||
version: latest,
|
||||
|
||||
Reference in New Issue
Block a user