• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

CLI interface to medialist (fossil mirror)


Commit MetaInfo

Revision7a3ac9aea86cf38b640785f0f96c1a2aafdb1223 (tree)
Zeit2021-09-22 12:27:40
Autormio <stigma@disr...>
Commitermio

Log Message

Add alias for header/position pair

FossilOrigin-Name: ac314888ed34cf2ad21859610f878ab249b0a2e1b5c2d9a49edd836464f4a118

Ändern Zusammenfassung

Diff

--- a/util.d
+++ b/util.d
@@ -20,6 +20,8 @@ module util;
2020
2121 import std.typecons : Tuple, tuple;
2222
23+alias HeaderPairType = Tuple!(size_t, string);
24+
2325 /**
2426 * The number of headers supported by MediaList (CLI).
2527 *
@@ -120,12 +122,12 @@ expandEnvironmentVariables(string str)
120122 *
121123 * Returns: An array of Tuple(tabIndent (size_t), header (string)).
122124 */
123-@trusted public Tuple!(size_t, string)[NUMBER_OF_ML_HEADERS]
125+@trusted public HeaderPairType[NUMBER_OF_ML_HEADERS]
124126 parseMLHeader(string[] headerSections)
125127 {
126128 import std.string : toLower;
127129
128- Tuple!(size_t, string)[NUMBER_OF_ML_HEADERS] sections;
130+ HeaderPairType[NUMBER_OF_ML_HEADERS] sections;
129131 size_t validHeaderCounter = 0;
130132
131133 foreach (tabIndent, headerSection; headerSections)