File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -737,21 +737,23 @@ pub(crate) fn href_relative_parts<'fqp>(
737
737
if f != r {
738
738
let dissimilar_part_count = relative_to_fqp. len ( ) - i;
739
739
let fqp_module = & fqp[ i..fqp. len ( ) ] ;
740
- return box iter:: repeat ( sym:: dotdot)
741
- . take ( dissimilar_part_count)
742
- . chain ( fqp_module. iter ( ) . copied ( ) ) ;
740
+ return Box :: new (
741
+ iter:: repeat ( sym:: dotdot)
742
+ . take ( dissimilar_part_count)
743
+ . chain ( fqp_module. iter ( ) . copied ( ) ) ,
744
+ ) ;
743
745
}
744
746
}
745
747
// e.g. linking to std::sync::atomic from std::sync
746
748
if relative_to_fqp. len ( ) < fqp. len ( ) {
747
- box fqp[ relative_to_fqp. len ( ) ..fqp. len ( ) ] . iter ( ) . copied ( )
749
+ Box :: new ( fqp[ relative_to_fqp. len ( ) ..fqp. len ( ) ] . iter ( ) . copied ( ) )
748
750
// e.g. linking to std::sync from std::sync::atomic
749
751
} else if fqp. len ( ) < relative_to_fqp. len ( ) {
750
752
let dissimilar_part_count = relative_to_fqp. len ( ) - fqp. len ( ) ;
751
- box iter:: repeat ( sym:: dotdot) . take ( dissimilar_part_count)
753
+ Box :: new ( iter:: repeat ( sym:: dotdot) . take ( dissimilar_part_count) )
752
754
// linking to the same module
753
755
} else {
754
- box iter:: empty ( )
756
+ Box :: new ( iter:: empty ( ) )
755
757
}
756
758
}
757
759
You can’t perform that action at this time.
0 commit comments