GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix lockfile-only exclusion to use PurlKey normalization · SocketDev/socket-patch@aae44b9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • crates/socket-patch-cli/src/commands/scan
    • discovery.rs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎crates/socket-patch-cli/src/commands/scan/discovery.rs‎

Copy file name to clipboardExpand all lines: crates/socket-patch-cli/src/commands/scan/discovery.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ pub(crate) async fn lockfile_supplement(
7575
if entries.is_empty() {
7676
return out;
7777
}
78-
let crawled_purls: HashSet<&str> = crawled.iter().map(|p| p.purl.as_str()).collect();
78+
let crawled_purls: HashSet<PurlKey> = crawled.iter().map(|p| PurlKey::new(&p.purl)).collect();
7979
let in_scope = |purl: &str| {
8080
only.is_none_or(|list| {
8181
socket_patch_core::crawlers::Ecosystem::from_purl(purl)
8282
.is_some_and(|eco| list.iter().any(|name| name == eco.cli_name()))
8383
})
8484
};
8585
for entry in entries {
86-
if crawled_purls.contains(entry.purl.as_str()) || !in_scope(&entry.purl) {
86+
if crawled_purls.contains(&PurlKey::new(&entry.purl)) || !in_scope(&entry.purl) {
8787
continue;
8888
}
8989
let Some(pkg) = crawled_from_purl(&entry.purl, &common.cwd) else {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.