From 7b9995568f22f3bef2bdc857323796d3068e8992 Mon Sep 17 00:00:00 2001 From: Diomendius <42310725+Diomendius@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:11:28 +1200 Subject: [PATCH] Avoid mysterious `Default::default()` In `deploy::test::{low_level_simple, low_level_skip}`, `Default::default()` was used to construct a `BTreeMap`, with the only indication of the variable's type being the signature of `RealActionRunner::new()`, which it was passed by reference to. Clippy's default-trait-access lint caught this. --- src/deploy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/deploy.rs b/src/deploy.rs index b940dfa..87c604c 100644 --- a/src/deploy.rs +++ b/src/deploy.rs @@ -697,7 +697,7 @@ mod test { let opt = Options::default(); let handlebars = handlebars::Handlebars::new(); - let variables = Default::default(); + let variables = BTreeMap::new(); // Expectation: // create_symlink @@ -800,7 +800,7 @@ mod test { let opt = Options::default(); let handlebars = handlebars::Handlebars::new(); - let variables = Default::default(); + let variables = BTreeMap::new(); // Expectation: // create_symlink