MCPcopy Create free account
hub / github.com/csskit/csskit / process_single_version

Function process_single_version

crates/csskit_spec_generator/src/main.rs:138–153  ·  view source on GitHub ↗

Processes a single spec version and adds its properties to the accumulator Returns the number of properties found

(
	client: &reqwest::Client,
	name: &str,
	version: usize,
	accumulator: &mut HashMap<String, PropertyDefinition>,
)

Source from the content-addressed store, hash-verified

136///
137/// Returns the number of properties found
138async fn process_single_version(
139 client: &reqwest::Client,
140 name: &str,
141 version: usize,
142 accumulator: &mut HashMap<String, PropertyDefinition>,
143) -> Result<usize> {
144 let html = get_spec(client, name, version).await?;
145 let properties = parse_spec_properties(&html)?;
146
147 let count = properties.len();
148 for prop in properties {
149 accumulator.insert(prop.name.clone(), prop);
150 }
151
152 Ok(count)
153}
154
155/// Displays verbose output including property names and code preview
156fn show_verbose_output(properties: &[PropertyDefinition], code: &str, line_count: usize) {

Callers 1

Calls 5

get_specFunction · 0.85
parse_spec_propertiesFunction · 0.85
cloneMethod · 0.80
lenMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected