rust-filepatterns: don't `Box` subincludes unnecessarily
authorRaphaël Gomès <rgomes@octobus.net>
Mon, 09 Jan 2023 19:07:44 +0100
changeset 49928 ccb6cfb0f2c0
parent 49927 2202832b35e8
child 49929 5f1cd6839c69
rust-filepatterns: don't `Box` subincludes unnecessarily This was caught by `clippy`.
rust/hg-core/src/filepatterns.rs
--- 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)
         }