Skip to content

Commit c48de12

Browse files
committed
Make linters happy
1 parent aa137dd commit c48de12

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ disallowed-methods = [
33
"std::io::Write::flush",
44
{ path = "std::path::Path::exists", reason = "use `std::path::Path::try_exists`" },
55
]
6+
msrv = "1.87"

src/github/real/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn repository_uncached(owner: &str, repo: &str) -> Result<serde_json::Value> {
7676
call_api(owner, repo, None, &[])
7777
}
7878

79-
fn match_github_url(url: Url) -> Result<(Url, &str, &str, &str)> {
79+
fn match_github_url(url: Url<'_>) -> Result<(Url<'_>, &str, &str, &str)> {
8080
let (url_string, owner_slash_repo, owner, repo) = {
8181
#[allow(clippy::unwrap_used)]
8282
if let Some(captures) = RE.captures(url.as_str()) {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ fn timestamp_from_clone(pkg: &Package) -> Result<RepoStatus<'_, SystemTime>> {
778778

779779
#[cfg_attr(dylint_lib = "general", allow(non_local_effect_before_error_return))]
780780
#[cfg_attr(dylint_lib = "supplementary", allow(commented_out_code))]
781-
fn clone_repository(pkg: &Package) -> Result<RepoStatus<PathBuf>> {
781+
fn clone_repository(pkg: &Package) -> Result<RepoStatus<'_, PathBuf>> {
782782
let repo_status = REPOSITORY_CACHE.with_borrow_mut(|repository_cache| -> Result<_> {
783783
on_disk_cache::with_cache(|cache| -> Result<_> {
784784
// smoelius: Check all urls associated with the package.

src/url.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl<'a> From<&'a str> for Url<'a> {
4343
///
4444
/// - the repository url stored in the [`cargo_metadata::Package`]
4545
/// - a "shortened" url consisting of just the domain and two fragments
46-
pub(crate) fn urls(pkg: &cargo_metadata::Package) -> impl IntoIterator<Item = Url> {
46+
pub(crate) fn urls(pkg: &cargo_metadata::Package) -> impl IntoIterator<Item = Url<'_>> {
4747
let mut urls = Vec::new();
4848

4949
if let Some(url_string) = &pkg.repository {

0 commit comments

Comments
 (0)