Skip to main content

render_template

Function render_template 

Source
pub fn render_template(template: &str, version: &str) -> String
Expand description

Substitute the documented placeholders in template.

The grammar — {version}, {target}, {os}, {arch}, {ext} — is part of the public contract (DirectParams::asset_url_template). Each .replace call uses string literals that look like format directives but aren’t — the allow(clippy::literal_string_with_formatting_args) acknowledges that and prevents the lint from interpreting the template syntax as a format-string bug.