MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / parse_url

Function parse_url

css-inline/src/main.rs:28–34  ·  view source on GitHub ↗
(url: Option<&str>)

Source from the content-addressed store, hash-verified

26 };
27
28 fn parse_url(url: Option<&str>) -> Result<Option<url::Url>, url::ParseError> {
29 Ok(if let Some(url) = url {
30 Some(url::Url::parse(url)?)
31 } else {
32 None
33 })
34 }
35
36 #[derive(Debug)]
37 struct ParseError {

Callers 1

mainFunction · 0.70

Calls 1

parseFunction · 0.85

Tested by

no test coverage detected