Skip to content

Commit

Permalink
&
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Oct 13, 2023
1 parent ee013d9 commit 62b5584
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/download/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async fn main() -> anyhow::Result<()> {

let octocrab = &octocrab()?;

let core = find_gh_asset(octocrab, core_repo, &version, |tag| {
let core = find_gh_asset(octocrab, &core_repo, &version, |tag| {
let device = match (os, device) {
(Os::Linux, Device::Cuda) => "gpu",
(_, device) => device.into(),
Expand All @@ -167,15 +167,15 @@ async fn main() -> anyhow::Result<()> {
})
.await?;

let model = find_gh_asset(octocrab, core_repo, &version, |tag| {
let model = find_gh_asset(octocrab, &core_repo, &version, |tag| {
format!("model-{tag}.zip")
})
.await?;

let additional_libraries = OptionFuture::from((device != Device::Cpu).then(|| {
find_gh_asset(
octocrab,
additional_libraries_repo,
&additional_libraries_repo,
&additional_libraries_version,
|_| {
let device = match device {
Expand Down Expand Up @@ -267,7 +267,7 @@ fn octocrab() -> octocrab::Result<Arc<Octocrab>> {

async fn find_gh_asset(
octocrab: &Arc<Octocrab>,
repo: RepoName,
repo: &RepoName,
git_tag_or_latest: &str,
asset_name: impl FnOnce(&str) -> String,
) -> anyhow::Result<GhAsset> {
Expand All @@ -293,7 +293,7 @@ async fn find_gh_asset(

Ok(GhAsset {
octocrab: octocrab.clone(),
repo,
repo: repo.clone(),
tag: tag_name,
id,
name,
Expand Down

0 comments on commit 62b5584

Please sign in to comment.