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

Function parse_value

css-inline/src/main.rs:122–130  ·  view source on GitHub ↗
(value: &str, flag: &str)

Source from the content-addressed store, hash-verified

120 }
121
122 fn parse_value<T>(value: &str, flag: &str) -> Result<T, ParseError>
123 where
124 T: FromStr,
125 T::Err: fmt::Display,
126 {
127 value.parse::<T>().map_err(|e| ParseError {
128 message: format!("Failed to parse value '{value}' for flag '{flag}': {e}"),
129 })
130 }
131
132 fn handle_flag_with_value(
133 parsed: &mut ParsedArgs,

Callers 1

handle_flag_with_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected