fix: resolve type mismatch in sdist URL and filename mapping

- Use closure instead of direct function reference for Cow<str> types
- Fix compilation error with std::string::ToString::to_string
- Ensure proper type conversion for URL and filename extraction

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Alessandro De Maria 2025-07-05 23:25:40 +00:00
parent 93ecb1bcd7
commit f0a5b64b33

View file

@ -176,10 +176,10 @@ impl PexLock {
// Add source distributions
if let Some(sdist) = &package.sdist {
let Some(sdist_url) = sdist.url().map(std::string::ToString::to_string) else {
let Some(sdist_url) = sdist.url().map(|u| u.to_string()) else {
continue;
};
let Some(sdist_filename) = sdist.filename().map(std::string::ToString::to_string) else {
let Some(sdist_filename) = sdist.filename().map(|f| f.to_string()) else {
continue;
};