Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelodder7 committed Nov 7, 2024
1 parent dbc139a commit 83b1f62
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
22 changes: 20 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,16 @@ impl Country {

country!(cyprus, "196", 196, "CY", "CYP", "Cyprus");

country!(czechia, "203", 203, "CZ", "CZE", "Czechia", CzechiaTable, "CzechRepublic");
country!(
czechia,
"203",
203,
"CZ",
"CZE",
"Czechia",
CzechiaTable,
"CzechRepublic"
);

country!(denmark, "208", 208, "DK", "DNK", "Denmark");

Expand Down Expand Up @@ -1239,7 +1248,16 @@ impl Country {
"UnitedStatesOfAmerica"
);

country!(timor_leste, "626", 626, "TL", "TLS", "Timor Leste", TimorTable, "EastTimor");
country!(
timor_leste,
"626",
626,
"TL",
"TLS",
"Timor Leste",
TimorTable,
"EastTimor"
);

country!(togo, "768", 768, "TG", "TGO", "Togo");

Expand Down
10 changes: 5 additions & 5 deletions src/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ lookup!(TrinidadTable, Trinidad, "Trinidad And Tobago", 2, "Trinidad" => "trinid
lookup!(TanzaniaTable, Tanzania, "United Republic Of Tanzania", 1, "Tanzania" => "tanzania");
lookup!(TurkeyTable, Turkey, "Türkiye", 1, "Turkey" => "turkey");
lookup!(TimorTable, TimorLeste, "Timor-Leste", 1, "EastTimor" => "easttimor");
lookup!(CzechiaTable, Czechia, "Czechia", 1, "CzechRepulic" => "czechrepublic");
lookup!(CzechiaTable, Czechia, "Czechia", 1, "CzechRepublic" => "czechrepublic");

/// Wrapper struct for alias tables to avoid using Box
#[derive(Copy, Clone, Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd)]
Expand Down Expand Up @@ -439,7 +439,7 @@ impl LookupTable for CountryTable {
CountryTable::Tanzania(t) => t.contains(alias),
CountryTable::Turkey(t) => t.contains(alias),
CountryTable::TimorLeste(t) => t.contains(alias),
CountryTable::Czeckia(t) => t.contains(alias),
CountryTable::Czechia(t) => t.contains(alias),
}
}

Expand Down Expand Up @@ -501,7 +501,7 @@ impl LookupTable for CountryTable {
CountryTable::Tanzania(t) => t.len(),
CountryTable::Turkey(t) => t.len(),
CountryTable::TimorLeste(t) => t.len(),
CountryTable::Czeckia(t) => t.len(),
CountryTable::Czechia(t) => t.len(),
}
}

Expand Down Expand Up @@ -563,7 +563,7 @@ impl LookupTable for CountryTable {
CountryTable::Tanzania(t) => t.iter(),
CountryTable::Turkey(t) => t.iter(),
CountryTable::TimorLeste(t) => t.iter(),
CountryTable::Czeckia(t) => t.iter(),
CountryTable::Czechia(t) => t.iter(),
}
}
}
Expand Down Expand Up @@ -627,7 +627,7 @@ impl fmt::Display for CountryTable {
CountryTable::Tanzania(t) => write!(f, "{}", t),
CountryTable::Turkey(t) => write!(f, "{}", t),
CountryTable::TimorLeste(t) => write!(f, "{}", t),
CountryTable::Czeckia(t) => write!(f, "{}", t),
CountryTable::Czechia(t) => write!(f, "{}", t),
}
}
}

0 comments on commit 83b1f62

Please sign in to comment.