@@ -129,7 +129,7 @@ where
129129 // TODO: print all failures instead of the first one found.
130130 rx.iter()
131131 .find(|result| result.is_err())
132− .map(|err| err.with_context(|| format!("Failed to {} some grammar(s)", action)))
132+ .map(|err| err.with_context(|| format!("Failed to {action} some grammar(s)")))
133133 .unwrap_or(Ok(()))
134134}
135135
@@ -162,7 +162,10 @@ fn fetch_grammar(grammar: GrammarConfiguration) -> Result<()> {
162162 // Fetch the exact revision from the remote.
163163 // Supported by server-side git since v2.5.0 (July 2015),
164164 // enabled by default on major git hosts.
165− git(&grammar_dir, ["fetch", REMOTE_NAME, &revision])?;
165+ git(
166+ &grammar_dir,
167+ ["fetch", "--depth", "1", REMOTE_NAME, &revision],
168+ )?;
166169 git(&grammar_dir, ["checkout", &revision])?;
167170
168171 println!(