diff --git a/crates/puffin-dev/src/resolve_cli.rs b/crates/puffin-dev/src/resolve_cli.rs index f280cc4a2..14ad97dcd 100644 --- a/crates/puffin-dev/src/resolve_cli.rs +++ b/crates/puffin-dev/src/resolve_cli.rs @@ -3,7 +3,7 @@ use std::io::{BufWriter, Write}; use std::path::PathBuf; use anstream::println; -use anyhow::Context; +use anyhow::{Context, Result}; use clap::{Parser, ValueEnum}; use fs_err::File; use itertools::Itertools; @@ -41,7 +41,7 @@ pub(crate) struct ResolveCliArgs { cache_args: CacheArgs, } -pub(crate) async fn resolve_cli(args: ResolveCliArgs) -> anyhow::Result<()> { +pub(crate) async fn resolve_cli(args: ResolveCliArgs) -> Result<()> { let cache_dir = CacheDir::try_from(args.cache_args)?; let platform = Platform::current()?; diff --git a/crates/puffin-dev/src/resolve_many.rs b/crates/puffin-dev/src/resolve_many.rs index 58d15866c..f7d821e06 100644 --- a/crates/puffin-dev/src/resolve_many.rs +++ b/crates/puffin-dev/src/resolve_many.rs @@ -42,9 +42,9 @@ pub(crate) async fn resolve_many(args: ResolveManyArgs) -> Result<()> { let data = fs::read_to_string(&args.list)?; let lines = data.lines().map(Requirement::from_str); let requirements: Vec = if let Some(limit) = args.limit { - lines.take(limit).collect::>()? + lines.take(limit).collect::>()? } else { - lines.collect::>()? + lines.collect::>()? }; let platform = Platform::current()?; diff --git a/crates/puffin-traits/src/lib.rs b/crates/puffin-traits/src/lib.rs index a8bf9059a..91308e357 100644 --- a/crates/puffin-traits/src/lib.rs +++ b/crates/puffin-traits/src/lib.rs @@ -4,6 +4,8 @@ use std::future::Future; use std::path::Path; use std::pin::Pin; +use anyhow::Result; + use pep508_rs::Requirement; use puffin_interpreter::{InterpreterInfo, Virtualenv}; @@ -68,7 +70,7 @@ pub trait BuildContext { fn resolve<'a>( &'a self, requirements: &'a [Requirement], - ) -> Pin>> + Send + 'a>>; + ) -> Pin>> + Send + 'a>>; /// Install the given set of package versions into the virtual environment. The environment must /// use the same base python as [`BuildContext::base_python`] @@ -76,7 +78,7 @@ pub trait BuildContext { &'a self, requirements: &'a [Requirement], venv: &'a Virtualenv, - ) -> Pin> + Send + 'a>>; + ) -> Pin> + Send + 'a>>; /// Build a source distribution into a wheel from an archive. /// @@ -89,5 +91,5 @@ pub trait BuildContext { subdirectory: Option<&'a Path>, wheel_dir: &'a Path, package_id: &'a str, - ) -> Pin> + Send + 'a>>; + ) -> Pin> + Send + 'a>>; }