From dc751ee20720d90975d6384b97690b733a0d5857 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Mon, 4 Nov 2019 23:29:20 -0800 Subject: [PATCH] Update champion docs --- README.md | 2 +- src/consts/champion.rs | 23 ++++++++++++----------- srcgen/consts/champion.rs.dt | 9 +++++---- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index dac26bf..4fc6a31 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Riven
- Riven icon + Riven Github Crates.io Docs.rs Travis CI diff --git a/src/consts/champion.rs b/src/consts/champion.rs index 07a04df..e16f471 100644 --- a/src/consts/champion.rs +++ b/src/consts/champion.rs @@ -331,17 +331,18 @@ impl Champion { /// /// This is generally the `en_US` name with spaces and punctuation removed, /// but there are the following exceptions: - /// | Name | Identifier | - /// |------|------------| - /// | None | `"NONE"` (placeholder value) | - /// | Cho'Gath | "Chogath" | - /// | Fiddlesticks | "FiddleSticks" | - /// | Kai'Sa | "Kaisa" | - /// | Kha'Zix | "Khazix" | - /// | LeBlanc | "Leblanc" | - /// | Nunu & Willump | "Nunu" | - /// | Vel'Koz | "Velkoz" | - /// | Wukong | "MonkeyKing" | + /// + /// Variant | Name | Identifier + /// --------|------|----------- + /// `None` | "NONE" | "NONE" + /// `ChoGath` | "Cho'Gath" | "Chogath" + /// `Fiddlesticks` | "Fiddlesticks" | "FiddleSticks" + /// `KaiSa` | "Kai'Sa" | "Kaisa" + /// `KhaZix` | "Kha'Zix" | "Khazix" + /// `LeBlanc` | "LeBlanc" | "Leblanc" + /// `NunuWillump` | "Nunu & Willump" | "Nunu" + /// `VelKoz` | "Vel'Koz" | "Velkoz" + /// `Wukong` | "Wukong" | "MonkeyKing" pub fn identifier(self) -> &'static str { match self { Self::None => "NONE", diff --git a/srcgen/consts/champion.rs.dt b/srcgen/consts/champion.rs.dt index b473db3..70e6db4 100644 --- a/srcgen/consts/champion.rs.dt +++ b/srcgen/consts/champion.rs.dt @@ -55,14 +55,15 @@ impl Champion { /// /// This is generally the `en_US` name with spaces and punctuation removed, /// but there are the following exceptions: - /// | Name | Identifier | - /// |------|------------| - /// | None | `"NONE"` (placeholder value) | + /// + /// Variant | Name | Identifier + /// --------|------|----------- + /// `None` | "NONE" | "NONE" {{ for (let { name, alias } of champions) { if (name.replace(/[^a-zA-Z0-9]+/, '') !== alias) { }} - /// | {{= name }} | "{{= alias }}" | + /// `{{= enumName(name) }}` | "{{= name }}" | "{{= alias }}" {{ } }