Skip to content

Commit d294946

Browse files
committed
servo: Merge #19424 - Remove unused generic from push_applicable_declarations (from mbrubeck:veclike); r=emilio
This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35). If we do need to make this function generic in the future, we can do it using standard traits instead. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are removing unused code Source-Repo: https://github.com/servo/servo Source-Revision: dbe3136a055008d2c27c7d96f20e0c9ce4b1cb1c UltraBlame original commit: 6b3c508ccd771b8e529679a7680e7ba03d40ffca
1 parent 264029f commit d294946

File tree

2 files changed

+12
-75
lines changed

2 files changed

+12
-75
lines changed

servo/components/style/selector_map.rs

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use
88
applicable_declarations
99
:
1010
:
11-
ApplicableDeclarationBlock
11+
ApplicableDeclarationList
1212
;
1313
use
1414
context
@@ -99,10 +99,7 @@ use
9999
smallvec
100100
:
101101
:
102-
{
103102
SmallVec
104-
VecLike
105-
}
106103
;
107104
use
108105
std
@@ -555,7 +552,6 @@ fn
555552
get_all_matching_rules
556553
<
557554
E
558-
V
559555
F
560556
>
561557
(
@@ -573,7 +569,7 @@ matching_rules_list
573569
:
574570
&
575571
mut
576-
V
572+
ApplicableDeclarationList
577573
context
578574
:
579575
&
@@ -601,12 +597,6 @@ where
601597
E
602598
:
603599
TElement
604-
V
605-
:
606-
VecLike
607-
<
608-
ApplicableDeclarationBlock
609-
>
610600
F
611601
:
612602
FnMut
@@ -799,7 +789,6 @@ fn
799789
get_matching_rules
800790
<
801791
E
802-
V
803792
F
804793
>
805794
(
@@ -817,7 +806,7 @@ matching_rules
817806
:
818807
&
819808
mut
820-
V
809+
ApplicableDeclarationList
821810
context
822811
:
823812
&
@@ -842,12 +831,6 @@ where
842831
E
843832
:
844833
TElement
845-
V
846-
:
847-
VecLike
848-
<
849-
ApplicableDeclarationBlock
850-
>
851834
F
852835
:
853836
FnMut

servo/components/style/stylist.rs

Lines changed: 9 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -271,15 +271,6 @@ use
271271
selectors
272272
:
273273
:
274-
sink
275-
:
276-
:
277-
Push
278-
;
279-
use
280-
selectors
281-
:
282-
:
283274
visitor
284275
:
285276
:
@@ -311,21 +302,6 @@ smallbitvec
311302
SmallBitVec
312303
;
313304
use
314-
smallvec
315-
:
316-
:
317-
VecLike
318-
;
319-
use
320-
std
321-
:
322-
:
323-
fmt
324-
:
325-
:
326-
Debug
327-
;
328-
use
329305
std
330306
:
331307
:
@@ -4607,7 +4583,6 @@ fn
46074583
push_applicable_declarations
46084584
<
46094585
E
4610-
V
46114586
F
46124587
>
46134588
(
@@ -4658,7 +4633,7 @@ applicable_declarations
46584633
:
46594634
&
46604635
mut
4661-
V
4636+
ApplicableDeclarationList
46624637
context
46634638
:
46644639
&
@@ -4680,19 +4655,6 @@ where
46804655
E
46814656
:
46824657
TElement
4683-
V
4684-
:
4685-
Push
4686-
<
4687-
ApplicableDeclarationBlock
4688-
>
4689-
+
4690-
VecLike
4691-
<
4692-
ApplicableDeclarationBlock
4693-
>
4694-
+
4695-
Debug
46964658
F
46974659
:
46984660
FnMut
@@ -5180,12 +5142,10 @@ sa
51805142
=
51815143
style_attribute
51825144
{
5183-
Push
5184-
:
5185-
:
5145+
applicable_declarations
5146+
.
51865147
push
51875148
(
5188-
applicable_declarations
51895149
ApplicableDeclarationBlock
51905150
:
51915151
:
@@ -5213,12 +5173,10 @@ so
52135173
=
52145174
smil_override
52155175
{
5216-
Push
5217-
:
5218-
:
5176+
applicable_declarations
5177+
.
52195178
push
52205179
(
5221-
applicable_declarations
52225180
ApplicableDeclarationBlock
52235181
:
52245182
:
@@ -5248,12 +5206,10 @@ animation_rules
52485206
.
52495207
0
52505208
{
5251-
Push
5252-
:
5253-
:
5209+
applicable_declarations
5210+
.
52545211
push
52555212
(
5256-
applicable_declarations
52575213
ApplicableDeclarationBlock
52585214
:
52595215
:
@@ -5306,12 +5262,10 @@ animation_rules
53065262
.
53075263
1
53085264
{
5309-
Push
5310-
:
5311-
:
5265+
applicable_declarations
5266+
.
53125267
push
53135268
(
5314-
applicable_declarations
53155269
ApplicableDeclarationBlock
53165270
:
53175271
:

0 commit comments

Comments
 (0)