MCPcopy Create free account
hub / github.com/cargo-lambda/cargo-lambda / find_local_zip_file

Function find_local_zip_file

crates/cargo-lambda-new/src/template.rs:269–280  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

267}
268
269fn find_local_zip_file(value: &str) -> Option<PathBuf> {
270 // ignore error to fallback to other template options.
271 if let Ok(path) = dunce::realpath(value)
272 && path.exists()
273 && path.is_file()
274 && path.extension().unwrap_or_default() == "zip"
275 {
276 return Some(path);
277 }
278
279 None
280}
281
282fn match_git_http_url(original: &str) -> Option<GitRepo> {
283 let uri = translate_shortcut(original);

Callers 1

try_fromMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected