mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-16 23:56:37 +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 {
|
||||
async fn to_response(self) -> Result<Response, DownloadError> {
|
||||
async fn into_response(self) -> Result<Response, DownloadError> {
|
||||
Ok(match self {
|
||||
DownloadContent::ToIssue { client, url } => client.get(url).send(true).await?,
|
||||
DownloadContent::Response(response) => response,
|
||||
|
@ -163,7 +163,7 @@ impl<'a> Download<'a> {
|
|||
let mut data_verifier = self.data_verifier;
|
||||
Ok(self
|
||||
.content
|
||||
.to_response()
|
||||
.into_response()
|
||||
.await?
|
||||
.bytes_stream()
|
||||
.map(move |res| {
|
||||
|
@ -272,7 +272,7 @@ impl Download<'_> {
|
|||
|
||||
#[instrument]
|
||||
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 {
|
||||
verifier.update(&bytes);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue