Function version_sync::check_contains_substring[][src]

pub fn check_contains_substring(
    path: &str,
    template: &str,
    pkg_name: &str,
    pkg_version: &str
) -> Result<(), String>
Expand description

Check that path contain the substring given by template.

The placeholders {name} and {version} will be replaced with pkg_name and pkg_version, if they are present in template. It is okay if template do not contain these placeholders.

See check_contains_regex if you want to match with a regular expression instead.

Errors

If the template cannot be found, an Err is returned with a succinct error message. Status information has then already been printed on stdout.