Commit 63f32a4
committed
refactor: complete DRY refactoring Phases 2, 3, and 4
Phase 2: Feed/Entry builder helper methods
- Added 6 FeedMeta helpers: set_title, set_subtitle, set_rights, set_generator, set_author, set_publisher
- Added 4 Entry helpers: set_title, set_summary, set_author, set_publisher
- Updated atom.rs and json.rs to use helpers
- Net reduction: 11 lines in parsers
Phase 3: Infrastructure for namespace consolidation
- Created parser/namespace_detection.rs (216 lines)
- Implemented NamespacePrefix struct with const construction
- Added 5 namespace constants: DC, CONTENT, MEDIA, ITUNES, PODCAST
- Added 6 unit tests for namespace detection
Phase 4: Buffer factory functions
- Added new_event_buffer() factory in common.rs
- Added new_text_buffer() factory in common.rs
- Semantic naming for consistent buffer creation
Impact:
- 315/315 tests passing
- Zero clippy warnings
- 300+ lines of infrastructure added
- Foundation for future namespace consolidation
- All changes backward compatible1 parent d99d36e commit 63f32a4
8 files changed
+515
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
| 122 | + | |
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
| |||
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
144 | | - | |
145 | | - | |
| 143 | + | |
146 | 144 | | |
147 | 145 | | |
148 | 146 | | |
| |||
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
157 | | - | |
158 | | - | |
| 155 | + | |
159 | 156 | | |
160 | 157 | | |
161 | 158 | | |
| |||
182 | 179 | | |
183 | 180 | | |
184 | 181 | | |
185 | | - | |
186 | | - | |
| 182 | + | |
187 | 183 | | |
188 | 184 | | |
189 | 185 | | |
| |||
193 | 189 | | |
194 | 190 | | |
195 | 191 | | |
196 | | - | |
197 | | - | |
| 192 | + | |
198 | 193 | | |
199 | 194 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 195 | + | |
206 | 196 | | |
207 | 197 | | |
208 | 198 | | |
| |||
288 | 278 | | |
289 | 279 | | |
290 | 280 | | |
291 | | - | |
292 | | - | |
| 281 | + | |
293 | 282 | | |
294 | 283 | | |
295 | 284 | | |
| |||
320 | 309 | | |
321 | 310 | | |
322 | 311 | | |
323 | | - | |
324 | | - | |
| 312 | + | |
325 | 313 | | |
326 | 314 | | |
327 | 315 | | |
| |||
332 | 320 | | |
333 | 321 | | |
334 | 322 | | |
335 | | - | |
336 | | - | |
| 323 | + | |
337 | 324 | | |
338 | 325 | | |
339 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
22 | 72 | | |
23 | 73 | | |
24 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
162 | 161 | | |
163 | 162 | | |
164 | 163 | | |
165 | | - | |
166 | | - | |
| 164 | + | |
167 | 165 | | |
168 | 166 | | |
169 | 167 | | |
| |||
182 | 180 | | |
183 | 181 | | |
184 | 182 | | |
185 | | - | |
186 | | - | |
| 183 | + | |
187 | 184 | | |
188 | 185 | | |
189 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
0 commit comments