MCPcopy Create free account
hub / github.com/acking-you/static_flow / parse_host

Function parse_host

crates/cli/src/commands/interactive.rs:381–386  ·  view source on GitHub ↗
(raw_url: &str)

Source from the content-addressed store, hash-verified

379}
380
381fn parse_host(raw_url: &str) -> Result<String> {
382 let url = Url::parse(raw_url).with_context(|| format!("invalid URL `{raw_url}`"))?;
383 url.host_str()
384 .map(|value| value.to_string())
385 .context("URL missing host")
386}
387
388fn non_empty_opt(value: &str) -> Option<String> {
389 let trimmed = value.trim();

Callers 1

Calls 1

with_contextMethod · 0.45

Tested by

no test coverage detected