Commit 2fbdc79
committed
Remove a Clean impl for a tuple (1)
This commit removes the first of nine Clean impls on tuples, converting
it to a function instead.
The fact that these are impls causes several problems:
1. They are nameless, so it's unclear what they do.
2. It's hard to find where they're used apart from removing them and
seeing what errors occur (this applies to all Clean impls, not just
the tuple ones).
3. Rustc doesn't currently warn when impls are unused, so dead code
can accumulate easily (all Clean impls).
4. Their bodies often use tuple field indexing syntax (e.g., `self.1`)
to refer to their "arguments", which makes reading the code more
difficult.
As I noted, some of these problems apply to all Clean impls, but even
those problems are exacerbated by the tuple impls since they make
general understanding of the code harder.
Converting the impls to functions solves all four of these problems.1 parent f2ecfc7 commit 2fbdc79
1 file changed
+18
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 107 | + | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
| |||
117 | 115 | | |
118 | 116 | | |
119 | 117 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
133 | 129 | | |
134 | | - | |
| 130 | + | |
135 | 131 | | |
136 | | - | |
137 | | - | |
| 132 | + | |
138 | 133 | | |
139 | 134 | | |
140 | 135 | | |
141 | 136 | | |
142 | | - | |
| 137 | + | |
143 | 138 | | |
144 | 139 | | |
145 | 140 | | |
| |||
162 | 157 | | |
163 | 158 | | |
164 | 159 | | |
| 160 | + | |
165 | 161 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 162 | + | |
170 | 163 | | |
171 | 164 | | |
172 | 165 | | |
| |||
0 commit comments