Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
main
Function · 0.70
Calls
1
parse
Function · 0.85
Tested by
no test coverage detected