mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-17 08:06:38 +00:00
Fix clippy lints
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
54f88e03d5
commit
1ad2d0ad87
1 changed files with 3 additions and 3 deletions
|
@ -97,7 +97,7 @@ enum DownloadContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DownloadContent {
|
impl DownloadContent {
|
||||||
async fn to_response(self) -> Result<Response, DownloadError> {
|
async fn into_response(self) -> Result<Response, DownloadError> {
|
||||||
Ok(match self {
|
Ok(match self {
|
||||||
DownloadContent::ToIssue { client, url } => client.get(url).send(true).await?,
|
DownloadContent::ToIssue { client, url } => client.get(url).send(true).await?,
|
||||||
DownloadContent::Response(response) => response,
|
DownloadContent::Response(response) => response,
|
||||||
|
@ -163,7 +163,7 @@ impl<'a> Download<'a> {
|
||||||
let mut data_verifier = self.data_verifier;
|
let mut data_verifier = self.data_verifier;
|
||||||
Ok(self
|
Ok(self
|
||||||
.content
|
.content
|
||||||
.to_response()
|
.into_response()
|
||||||
.await?
|
.await?
|
||||||
.bytes_stream()
|
.bytes_stream()
|
||||||
.map(move |res| {
|
.map(move |res| {
|
||||||
|
@ -272,7 +272,7 @@ impl Download<'_> {
|
||||||
|
|
||||||
#[instrument]
|
#[instrument]
|
||||||
pub async fn into_bytes(self) -> Result<Bytes, DownloadError> {
|
pub async fn into_bytes(self) -> Result<Bytes, DownloadError> {
|
||||||
let bytes = self.content.to_response().await?.bytes().await?;
|
let bytes = self.content.into_response().await?.bytes().await?;
|
||||||
if let Some(verifier) = self.data_verifier {
|
if let Some(verifier) = self.data_verifier {
|
||||||
verifier.update(&bytes);
|
verifier.update(&bytes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue