mirror of
https://github.com/SkyfallWasTaken/dinopkg.git
synced 2025-05-22 06:33:05 +00:00
Placate clippy
This commit is contained in:
parent
7e8ecea10c
commit
f41dac26eb
3 changed files with 5 additions and 10 deletions
|
@ -23,13 +23,10 @@ pub enum Error {
|
|||
}
|
||||
|
||||
impl PackageInfo {
|
||||
pub async fn from_name(
|
||||
package_name: &str,
|
||||
client: &reqwest::Client,
|
||||
) -> Result<PackageInfo, Error> {
|
||||
pub async fn from_name(package_name: &str, client: &reqwest::Client) -> Result<Self, Error> {
|
||||
let url = format!("{NPM_REGISTRY_ROOT_URL}/{package_name}");
|
||||
let response = client.get(&url).send().await?;
|
||||
let package_info = response.json::<PackageInfo>().await?;
|
||||
let package_info = response.json::<Self>().await?;
|
||||
Ok(package_info)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue