Skip to main content

build_patterns_shape

Function build_patterns_shape 

Source
pub fn build_patterns_shape(
    key: &str,
    patterns: &[String],
) -> Result<(), String>
Expand description

Whether a pattern list reads as Cargo’s include or exclude does.

Each gitignore-style pattern is one line with no control character, none is empty, and the gitignore matcher parses each. An empty list is no list, as in Cargo.

§Errors

The refusal text, naming the key and the pattern it refuses.