changeset 50001:ccb6cfb0f2c0

rust-filepatterns: don't `Box` subincludes unnecessarily This was caught by `clippy`.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 09 Jan 2023 19:07:44 +0100
parents 2202832b35e8
children 5f1cd6839c69
files rust/hg-core/src/filepatterns.rs
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/filepatterns.rs	Mon Jan 09 18:58:18 2023 +0100
+++ b/rust/hg-core/src/filepatterns.rs	Mon Jan 09 19:07:44 2023 +0100
@@ -581,14 +581,14 @@
 /// phase.
 pub fn filter_subincludes(
     ignore_patterns: Vec<IgnorePattern>,
-) -> Result<(Vec<Box<SubInclude>>, Vec<IgnorePattern>), HgPathError> {
+) -> Result<(Vec<SubInclude>, Vec<IgnorePattern>), HgPathError> {
     let mut subincludes = vec![];
     let mut others = vec![];
 
     for pattern in ignore_patterns {
         if let PatternSyntax::ExpandedSubInclude(sub_include) = pattern.syntax
         {
-            subincludes.push(sub_include);
+            subincludes.push(*sub_include);
         } else {
             others.push(pattern)
         }