CLI interface to medialist (fossil mirror)
Revision | 7a3ac9aea86cf38b640785f0f96c1a2aafdb1223 (tree) |
---|---|
Zeit | 2021-09-22 12:27:40 |
Autor | mio <stigma@disr...> |
Commiter | mio |
Add alias for header/position pair
FossilOrigin-Name: ac314888ed34cf2ad21859610f878ab249b0a2e1b5c2d9a49edd836464f4a118
@@ -20,6 +20,8 @@ module util; | ||
20 | 20 | |
21 | 21 | import std.typecons : Tuple, tuple; |
22 | 22 | |
23 | +alias HeaderPairType = Tuple!(size_t, string); | |
24 | + | |
23 | 25 | /** |
24 | 26 | * The number of headers supported by MediaList (CLI). |
25 | 27 | * |
@@ -120,12 +122,12 @@ expandEnvironmentVariables(string str) | ||
120 | 122 | * |
121 | 123 | * Returns: An array of Tuple(tabIndent (size_t), header (string)). |
122 | 124 | */ |
123 | -@trusted public Tuple!(size_t, string)[NUMBER_OF_ML_HEADERS] | |
125 | +@trusted public HeaderPairType[NUMBER_OF_ML_HEADERS] | |
124 | 126 | parseMLHeader(string[] headerSections) |
125 | 127 | { |
126 | 128 | import std.string : toLower; |
127 | 129 | |
128 | - Tuple!(size_t, string)[NUMBER_OF_ML_HEADERS] sections; | |
130 | + HeaderPairType[NUMBER_OF_ML_HEADERS] sections; | |
129 | 131 | size_t validHeaderCounter = 0; |
130 | 132 | |
131 | 133 | foreach (tabIndent, headerSection; headerSections) |