Skip to content

Commit

Permalink
Remove unused fetch_sparse_repodata
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier-lacroix committed May 19, 2024
1 parent a85a251 commit b51566d
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions src/project/repodata.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
use crate::project::has_features::HasFeatures;
use crate::project::Environment;
use crate::{config, project::Project, repodata};
use indexmap::IndexMap;
use rattler_conda_types::{Channel, Platform};
use rattler_repodata_gateway::{sparse::SparseRepoData, ChannelConfig, Gateway, SourceConfig};
use crate::{config, project::Project};
use rattler_repodata_gateway::{ChannelConfig, Gateway, SourceConfig};
use std::path::PathBuf;
use std::sync::Arc;

impl Project {
// TODO: Remove this function once everything is migrated to the new environment system.
pub async fn fetch_sparse_repodata(
&self,
) -> miette::Result<IndexMap<(Channel, Platform), SparseRepoData>> {
self.default_environment().fetch_sparse_repodata().await
}

/// Returns the [`Gateway`] used by this project.
pub fn repodata_gateway(&self) -> &Arc<Gateway> {
self.repodata_gateway.get_or_init(|| {
Expand Down Expand Up @@ -51,19 +40,3 @@ impl Project {
})
}
}

impl Environment<'_> {
pub async fn fetch_sparse_repodata(
&self,
) -> miette::Result<IndexMap<(Channel, Platform), SparseRepoData>> {
let channels = self.channels();
let platforms = self.platforms();
repodata::fetch_sparse_repodata(
channels,
platforms,
self.project().authenticated_client(),
Some(self.project().config()),
)
.await
}
}

0 comments on commit b51566d

Please sign in to comment.