File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ impl Input {
200200 } ;
201201
202202 // Split the target path into components
203- let mut component_vec: Vec < _ > = target_path
203+ let component_vec: Vec < _ > = target_path
204204 . as_path ( )
205205 . components ( )
206206 . map ( |c| c. as_os_str ( ) )
@@ -213,10 +213,7 @@ impl Input {
213213 // If there is such a root element in the path, construct the include path.
214214 // TODO: To be safe, check that the root path element still exists in a Git repository.
215215 if let Some ( position) = root_position {
216- let include_path = component_vec
217- . split_off ( position)
218- . iter ( )
219- . collect :: < PathBuf > ( ) ;
216+ let include_path = component_vec[ position..] . iter ( ) . collect :: < PathBuf > ( ) ;
220217 Some ( include_path)
221218 // If no appropriate root element was found, use a generic placeholder.
222219 } else {
You can’t perform that action at this time.
0 commit comments