INNER CODE UNIT · Rust

new

sharkdp/fd · src/exec/mod.rs:220

    fn new<I, S>(input: I, mode: ExecutionMode) -> Result<CommandTemplate>
    where
        I: IntoIterator<Item = S>,
        S: AsRef<str>,
    {
        let mut args = Vec::new();
        let mut has_placeholder = false;

        for arg in input {
            let arg = arg.as_ref();

            let tmpl = FormatTemplate::parse(arg);
            has_placeholder |= tmpl.has_tokens();
            args.push(tmpl);
        }

        // We need to check that we have at least one argument, because if not
        // it will try to execute each file and directory it finds.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…