File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 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>(
737737 if f != r {
738738 let dissimilar_part_count = relative_to_fqp. len ( ) - i;
739739 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+ ) ;
743745 }
744746 }
745747 // e.g. linking to std::sync::atomic from std::sync
746748 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 ( ) )
748750 // e.g. linking to std::sync from std::sync::atomic
749751 } else if fqp. len ( ) < relative_to_fqp. len ( ) {
750752 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) )
752754 // linking to the same module
753755 } else {
754- box iter:: empty ( )
756+ Box :: new ( iter:: empty ( ) )
755757 }
756758}
757759
You can’t perform that action at this time.
0 commit comments