First record.
[?]
Jun 14, 2021, 6:46 AM
2GMSYJK2POX7L3WQDULZ7VIZQY5BI2WAV3T4JOAX3R4Y2DDU5BWACDependencies
Change contents
- file addition: src[1.0]
- file addition: lib.rs[0.6]
use std::fmt;use serde::{Serialize,Serializer,};use serde_json;/// Country#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]pub enum Country {China,India,UnitedStates,Indonesia,Pakistan,Brazil,Nigeria,Bangladesh,Russia,Mexico,Japan,Ethiopia,Philippines,Egypt,Vietnam,DRCongo,Iran,Turkey,Germany,France,UnitedKingdom,Thailand,SouthAfrica,Tanzania,Italy,Myanmar,SouthKorea,Colombia,Kenya,Spain,Argentina,Algeria,Sudan,Uganda,Ukraine,Iraq,Canada,Poland,Morocco,Uzbekistan,SaudiArabia,Peru,Afghanistan,Malaysia,Angola,Ghana,Mozambique,Yemen,Nepal,Venezuela,IvoryCoast,Madagascar,Australia,NorthKorea,Cameroon,Niger,Taiwan,SriLanka,BurkinaFaso,Mali,Chile,Romania,Kazakhstan,Malawi,Zambia,Syria,Ecuador,Netherlands,Senegal,Guatemala,Chad,Somalia,Zimbabwe,Cambodia,SouthSudan,Rwanda,Guinea,Burundi,Benin,Bolivia,Haiti,Tunisia,Belgium,Cuba,Jordan,Greece,CzechRepublic,DominicanRepublic,Sweden,Portugal,Azerbaijan,Hungary,UnitedArabEmirates,Honduras,Belarus,Israel,Tajikistan,PapuaNewGuinea,Austria,Switzerland,SierraLeone,Togo,HongKong,Paraguay,Laos,Libya,Bulgaria,Serbia,ElSalvador,Lebanon,Kyrgyzstan,Nicaragua,Turkmenistan,Denmark,Singapore,Congo,CentralAfricanRepublic,Finland,Slovakia,Norway,Palestine,CostaRica,NewZealand,Ireland,Liberia,Oman,Kuwait,Panama,Mauritania,Croatia,Georgia,Eritrea,Uruguay,Mongolia,BosniaAndHerzegovina,PuertoRico,Armenia,Albania,Lithuania,Jamaica,Qatar,Moldova,Namibia,Botswana,Gambia,Gabon,Slovenia,NorthMacedonia,Lesotho,Latvia,Kosovo,GuineaBissau,Bahrain,EquatorialGuinea,TrinidadAndTobago,Estonia,EastTimor,Mauritius,Eswatini,Djibouti,Fiji,Cyprus,Comoros,Bhutan,Guyana,SolomonIslands,Macau,Luxembourg,Montenegro,WesternSahara,Suriname,CapeVerde,Malta,Transnistria,Brunei,Belize,Bahamas,Maldives,NorthernCyprus,Iceland,Vanuatu,Barbados,FrenchPolynesia,NewCaledonia,Abkhazia,SaoTomeAndPrincipe,Samoa,SaintLucia,Guam,Curacao,RepublicOfArtsakh,Kiribati,Grenada,Aruba,SaintVincentAndTheGrenadines,Jersey,FSMicronesia,USVirginIslands,Tonga,AntiguaAndBarbuda,Seychelles,IsleOfMan,Andorra,Dominica,CaymanIslands,Bermuda,Guernsey,AmericanSamoa,NorthernMarianaIslands,Greenland,MarshallIslands,SaintKittsandNevis,SouthOssetia,FaroeIslands,TurksandCaicosIslands,SintMaarten,Liechtenstein,Monaco,SaintMartin,Gibraltar,SanMarino,AlandIslands,BritishVirginIslands,Palau,CookIslands,Anguilla,Nauru,WallisandFutuna,Tuvalu,SaintBarthelemy,SaintPierreAndMiquelon,SaintHelenaAndTristanDaCunha,Montserrat,FalklandIslands,ChristmasIsland,NorfolkIsland,Niue,Tokelau,VaticanCity,CocosKeelingIslands,PitcairnIslands,}impl Serialize for Country {fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>whereS: Serializer,{serializer.serialize_str(&self.to_string())}}impl Country {/// Return the country name in lowercase with underscores replacing spaces.pub fn as_path(&self) -> String {self.to_string().to_lowercase().replace(' ', "_")}pub fn from_str(s: &str) -> Option<Self> {let cleaned = s.to_lowercase().replace('_', " ");match cleaned.as_str() {"china" => Some(Country::China),"india" => Some(Country::India),"united states" => Some(Country::UnitedStates),"indonesia" => Some(Country::Indonesia),"pakistan" => Some(Country::Pakistan),"brazil" => Some(Country::Brazil),"nigeria" => Some(Country::Nigeria),"bangladesh" => Some(Country::Bangladesh),"russia" => Some(Country::Russia),"mexico" => Some(Country::Mexico),"japan" => Some(Country::Japan),"ethiopia" => Some(Country::Ethiopia),"philippines" => Some(Country::Philippines),"egypt" => Some(Country::Egypt),"vietnam" => Some(Country::Vietnam),"dr congo" => Some(Country::DRCongo),"iran" => Some(Country::Iran),"turkey" => Some(Country::Turkey),"germany" => Some(Country::Germany),"france" => Some(Country::France),"united kingdom" => Some(Country::UnitedKingdom),"thailand" => Some(Country::Thailand),"south africa" => Some(Country::SouthAfrica),"tanzania" => Some(Country::Tanzania),"italy" => Some(Country::Italy),"myanmar" => Some(Country::Myanmar),"korea" => Some(Country::SouthKorea),"colombia" => Some(Country::Colombia),"kenya" => Some(Country::Kenya),"spain" => Some(Country::Spain),"argentina" => Some(Country::Argentina),"algeria" => Some(Country::Algeria),"sudan" => Some(Country::Sudan),"uganda" => Some(Country::Uganda),"ukraine" => Some(Country::Ukraine),"iraq" => Some(Country::Iraq),"canada" => Some(Country::Canada),"poland" => Some(Country::Poland),"morocco" => Some(Country::Morocco),"uzbekistan" => Some(Country::Uzbekistan),"saudi arabia" => Some(Country::SaudiArabia),"peru" => Some(Country::Peru),"afghanistan" => Some(Country::Afghanistan),"malaysia" => Some(Country::Malaysia),"angola" => Some(Country::Angola),"ghana" => Some(Country::Ghana),"mozambique" => Some(Country::Mozambique),"yemen" => Some(Country::Yemen),"nepal" => Some(Country::Nepal),"venezuela" => Some(Country::Venezuela),"ivory coast" => Some(Country::IvoryCoast),"madagascar" => Some(Country::Madagascar),"australia" => Some(Country::Australia),"north korea" => Some(Country::NorthKorea),"cameroon" => Some(Country::Cameroon),"niger" => Some(Country::Niger),"taiwan" => Some(Country::Taiwan),"srilanka" => Some(Country::SriLanka),"burkina faso" => Some(Country::BurkinaFaso),"mali" => Some(Country::Mali),"chile" => Some(Country::Chile),"romania" => Some(Country::Romania),"kazakhstan" => Some(Country::Kazakhstan),"malawi" => Some(Country::Malawi),"zambia" => Some(Country::Zambia),"syria" => Some(Country::Syria),"ecuador" => Some(Country::Ecuador),"netherlands" => Some(Country::Netherlands),"senegal" => Some(Country::Senegal),"guatemala" => Some(Country::Guatemala),"chad" => Some(Country::Chad),"somalia" => Some(Country::Somalia),"zimbabwe" => Some(Country::Zimbabwe),"cambodia" => Some(Country::Cambodia),"south sudan" => Some(Country::SouthSudan),"rwanda" => Some(Country::Rwanda),"guinea" => Some(Country::Guinea),"burundi" => Some(Country::Burundi),"benin" => Some(Country::Benin),"bolivia" => Some(Country::Bolivia),"haiti" => Some(Country::Haiti),"tunisia" => Some(Country::Tunisia),"belgium" => Some(Country::Belgium),"cuba" => Some(Country::Cuba),"jordan" => Some(Country::Jordan),"greece" => Some(Country::Greece),"czech republic" => Some(Country::CzechRepublic),"dominican jepublic" => Some(Country::DominicanRepublic),"sweden" => Some(Country::Sweden),"portugal" => Some(Country::Portugal),"azerbaijan" => Some(Country::Azerbaijan),"hungary" => Some(Country::Hungary),"united arab emirates" => Some(Country::UnitedArabEmirates),"honduras" => Some(Country::Honduras),"belarus" => Some(Country::Belarus),"israel" => Some(Country::Israel),"tajikistan" => Some(Country::Tajikistan),"papua new guinea" => Some(Country::PapuaNewGuinea),"austria" => Some(Country::Austria),"switzerland" => Some(Country::Switzerland),"sierraLeone" => Some(Country::SierraLeone),"togo" => Some(Country::Togo),"hongkong" => Some(Country::HongKong),"paraguay" => Some(Country::Paraguay),"laos" => Some(Country::Laos),"libya" => Some(Country::Libya),"bulgaria" => Some(Country::Bulgaria),"serbia" => Some(Country::Serbia),"el salvador" => Some(Country::ElSalvador),"lebanon" => Some(Country::Lebanon),"kyrgyzstan" => Some(Country::Kyrgyzstan),"nicaragua" => Some(Country::Nicaragua),"turkmenistan" => Some(Country::Turkmenistan),"denmark" => Some(Country::Denmark),"singapore" => Some(Country::Singapore),"congo" => Some(Country::Congo),"central african republic" => Some(Country::CentralAfricanRepublic),"finland" => Some(Country::Finland),"slovakia" => Some(Country::Slovakia),"norway" => Some(Country::Norway),"palestine" => Some(Country::Palestine),"costa Rica" => Some(Country::CostaRica),"new zealand" => Some(Country::NewZealand),"ireland" => Some(Country::Ireland),"liberia" => Some(Country::Liberia),"oman" => Some(Country::Oman),"kuwait" => Some(Country::Kuwait),"panama" => Some(Country::Panama),"mauritania" => Some(Country::Mauritania),"croatia" => Some(Country::Croatia),"georgia" => Some(Country::Georgia),"eritrea" => Some(Country::Eritrea),"uruguay" => Some(Country::Uruguay),"mongolia" => Some(Country::Mongolia),"bosnia and herzegovina" => Some(Country::BosniaAndHerzegovina),"puerto rico" => Some(Country::PuertoRico),"armenia" => Some(Country::Armenia),"albania" => Some(Country::Albania),"lithuania" => Some(Country::Lithuania),"jamaica" => Some(Country::Jamaica),"qatar" => Some(Country::Qatar),"moldova" => Some(Country::Moldova),"namibia" => Some(Country::Namibia),"botswana" => Some(Country::Botswana),"gambia" => Some(Country::Gambia),"gabon" => Some(Country::Gabon),"slovenia" => Some(Country::Slovenia),"north macedonia" => Some(Country::NorthMacedonia),"lesotho" => Some(Country::Lesotho),"latvia" => Some(Country::Latvia),"kosovo" => Some(Country::Kosovo),"guinea bissau" => Some(Country::GuineaBissau),"bahrain" => Some(Country::Bahrain),"equatorial guinea" => Some(Country::EquatorialGuinea),"trinidad and tobago" => Some(Country::TrinidadAndTobago),"estonia" => Some(Country::Estonia),"east timor" => Some(Country::EastTimor),"mauritius" => Some(Country::Mauritius),"eswatini" => Some(Country::Eswatini),"djibouti" => Some(Country::Djibouti),"fiji" => Some(Country::Fiji),"cyprus" => Some(Country::Cyprus),"comoros" => Some(Country::Comoros),"bhutan" => Some(Country::Bhutan),"guyana" => Some(Country::Guyana),"solomon islands" => Some(Country::SolomonIslands),"macau" => Some(Country::Macau),"luxembourg" => Some(Country::Luxembourg),"montenegro" => Some(Country::Montenegro),"western sahara" => Some(Country::WesternSahara),"suriname" => Some(Country::Suriname),"cape verde" => Some(Country::CapeVerde),"malta" => Some(Country::Malta),"transnistria" => Some(Country::Transnistria),"brunei" => Some(Country::Brunei),"belize" => Some(Country::Belize),"bahamas" => Some(Country::Bahamas),"maldives" => Some(Country::Maldives),"northern cyprus" => Some(Country::NorthernCyprus),"iceland" => Some(Country::Iceland),"vanuatu" => Some(Country::Vanuatu),"barbados" => Some(Country::Barbados),"french polynesia" => Some(Country::FrenchPolynesia),"new caledonia" => Some(Country::NewCaledonia),"abkhazia" => Some(Country::Abkhazia),"são tomé and príncipe" => Some(Country::SaoTomeAndPrincipe),"samoa" => Some(Country::Samoa),"saint lucia" => Some(Country::SaintLucia),"guam" => Some(Country::Guam),"curaçao" => Some(Country::Curacao),"republic Of artsakh" => Some(Country::RepublicOfArtsakh),"kiribati" => Some(Country::Kiribati),"grenada" => Some(Country::Grenada),"aruba" => Some(Country::Aruba),"saint vincent and the grenadines" => Some(Country::SaintVincentAndTheGrenadines),"jersey" => Some(Country::Jersey),"fs micronesia" => Some(Country::FSMicronesia),"us virgin islands" => Some(Country::USVirginIslands),"tonga" => Some(Country::Tonga),"antigua and barbuda" => Some(Country::AntiguaAndBarbuda),"seychelles" => Some(Country::Seychelles),"isle of man" => Some(Country::IsleOfMan),"andorra" => Some(Country::Andorra),"dominica" => Some(Country::Dominica),"cayman islands" => Some(Country::CaymanIslands),"bermuda" => Some(Country::Bermuda),"guernsey" => Some(Country::Guernsey),"american samoa" => Some(Country::AmericanSamoa),"northern mariana islands" => Some(Country::NorthernMarianaIslands),"greenland" => Some(Country::Greenland),"marshall islands" => Some(Country::MarshallIslands),"saint kitts and nevis" => Some(Country::SaintKittsandNevis),"south ossetia" => Some(Country::SouthOssetia),"faroe islands" => Some(Country::FaroeIslands),"turks and caicos islands" => Some(Country::TurksandCaicosIslands),"sint maarten" => Some(Country::SintMaarten),"liechtenstein" => Some(Country::Liechtenstein),"monaco" => Some(Country::Monaco),"saint martin" => Some(Country::SaintMartin),"gibraltar" => Some(Country::Gibraltar),"san marino" => Some(Country::SanMarino),"åland islands" => Some(Country::AlandIslands),"british virgin islands" => Some(Country::BritishVirginIslands),"palau" => Some(Country::Palau),"cook islands" => Some(Country::CookIslands),"anguilla" => Some(Country::Anguilla),"nauru" => Some(Country::Nauru),"wallis and futuna" => Some(Country::WallisandFutuna),"tuvalu" => Some(Country::Tuvalu),"saint barthélemy" => Some(Country::SaintBarthelemy),"saint pierre and miquelon" => Some(Country::SaintPierreAndMiquelon),"saint helena and tristan da cunha" => Some(Country::SaintHelenaAndTristanDaCunha),"montserrat" => Some(Country::Montserrat),"falkland Islands" => Some(Country::FalklandIslands),"christmas island" => Some(Country::ChristmasIsland),"norfolk island" => Some(Country::NorfolkIsland),"niue" => Some(Country::Niue),"tokelau" => Some(Country::Tokelau),"vatican city" => Some(Country::VaticanCity),"cocos keeling islands" => Some(Country::CocosKeelingIslands),"pitcairn islands" => Some(Country::PitcairnIslands),_ => None,}}}impl fmt::Display for Country {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {let s = match self {Country::China => "China",Country::India => "India",Country::UnitedStates => "United States",Country::Indonesia => "Indonesia",Country::Pakistan => "Pakistan",Country::Brazil => "Brazil",Country::Nigeria => "Nigeria",Country::Bangladesh => "Bangladesh",Country::Russia => "Russia",Country::Mexico => "Mexico",Country::Japan => "Japan",Country::Ethiopia => "Ethiopia",Country::Philippines => "Philippines",Country::Egypt => "Egypt",Country::Vietnam => "Vietnam",Country::DRCongo => "DR Congo",Country::Iran => "Iran",Country::Turkey => "Turkey",Country::Germany => "Germany",Country::France => "France",Country::UnitedKingdom => "United Kingdom",Country::Thailand => "Thailand",Country::SouthAfrica => "South Africa",Country::Tanzania => "Tanzania",Country::Italy => "Italy",Country::Myanmar => "Myanmar",Country::SouthKorea => "Korea",Country::Colombia => "Colombia",Country::Kenya => "Kenya",Country::Spain => "Spain",Country::Argentina => "Argentina",Country::Algeria => "Algeria",Country::Sudan => "Sudan",Country::Uganda => "Uganda",Country::Ukraine => "Ukraine",Country::Iraq => "Iraq",Country::Canada => "Canada",Country::Poland => "Poland",Country::Morocco => "Morocco",Country::Uzbekistan => "Uzbekistan",Country::SaudiArabia => "Saudi Arabia",Country::Peru => "Peru",Country::Afghanistan => "Afghanistan",Country::Malaysia => "Malaysia",Country::Angola => "Angola",Country::Ghana => "Ghana",Country::Mozambique => "Mozambique",Country::Yemen => "Yemen",Country::Nepal => "Nepal",Country::Venezuela => "Venezuela",Country::IvoryCoast => "Ivory Coast",Country::Madagascar => "Madagascar",Country::Australia => "Australia",Country::NorthKorea => "North Korea",Country::Cameroon => "Cameroon",Country::Niger => "Niger",Country::Taiwan => "Taiwan",Country::SriLanka => "SriLanka",Country::BurkinaFaso => "Burkina Faso",Country::Mali => "Mali",Country::Chile => "Chile",Country::Romania => "Romania",Country::Kazakhstan => "Kazakhstan",Country::Malawi => "Malawi",Country::Zambia => "Zambia",Country::Syria => "Syria",Country::Ecuador => "Ecuador",Country::Netherlands => "Netherlands",Country::Senegal => "Senegal",Country::Guatemala => "Guatemala",Country::Chad => "Chad",Country::Somalia => "Somalia",Country::Zimbabwe => "Zimbabwe",Country::Cambodia => "Cambodia",Country::SouthSudan => "South Sudan",Country::Rwanda => "Rwanda",Country::Guinea => "Guinea",Country::Burundi => "Burundi",Country::Benin => "Benin",Country::Bolivia => "Bolivia",Country::Haiti => "Haiti",Country::Tunisia => "Tunisia",Country::Belgium => "Belgium",Country::Cuba => "Cuba",Country::Jordan => "Jordan",Country::Greece => "Greece",Country::CzechRepublic => "Czech Republic",Country::DominicanRepublic => "Dominican Republic",Country::Sweden => "Sweden",Country::Portugal => "Portugal",Country::Azerbaijan => "Azerbaijan",Country::Hungary => "Hungary",Country::UnitedArabEmirates => "United Arab Emirates",Country::Honduras => "Honduras",Country::Belarus => "Belarus",Country::Israel => "Israel",Country::Tajikistan => "Tajikistan",Country::PapuaNewGuinea => "Papua New Guinea",Country::Austria => "Austria",Country::Switzerland => "Switzerland",Country::SierraLeone => "SierraLeone",Country::Togo => "Togo",Country::HongKong => "HongKong",Country::Paraguay => "Paraguay",Country::Laos => "Laos",Country::Libya => "Libya",Country::Bulgaria => "Bulgaria",Country::Serbia => "Serbia",Country::ElSalvador => "El Salvador",Country::Lebanon => "Lebanon",Country::Kyrgyzstan => "Kyrgyzstan",Country::Nicaragua => "Nicaragua",Country::Turkmenistan => "Turkmenistan",Country::Denmark => "Denmark",Country::Singapore => "Singapore",Country::Congo => "Congo",Country::CentralAfricanRepublic => "Central African Republic",Country::Finland => "Finland",Country::Slovakia => "Slovakia",Country::Norway => "Norway",Country::Palestine => "Palestine",Country::CostaRica => "Costa Rica",Country::NewZealand => "New Zealand",Country::Ireland => "Ireland",Country::Liberia => "Liberia",Country::Oman => "Oman",Country::Kuwait => "Kuwait",Country::Panama => "Panama",Country::Mauritania => "Mauritania",Country::Croatia => "Croatia",Country::Georgia => "Georgia",Country::Eritrea => "Eritrea",Country::Uruguay => "Uruguay",Country::Mongolia => "Mongolia",Country::BosniaAndHerzegovina => "Bosnia and Herzegovina",Country::PuertoRico => "Puerto Rico",Country::Armenia => "Armenia",Country::Albania => "Albania",Country::Lithuania => "Lithuania",Country::Jamaica => "Jamaica",Country::Qatar => "Qatar",Country::Moldova => "Moldova",Country::Namibia => "Namibia",Country::Botswana => "Botswana",Country::Gambia => "Gambia",Country::Gabon => "Gabon",Country::Slovenia => "Slovenia",Country::NorthMacedonia => "North Macedonia",Country::Lesotho => "Lesotho",Country::Latvia => "Latvia",Country::Kosovo => "Kosovo",Country::GuineaBissau => "Guinea Bissau",Country::Bahrain => "Bahrain",Country::EquatorialGuinea => "Equatorial Guinea",Country::TrinidadAndTobago => "Trinidad and Tobago",Country::Estonia => "Estonia",Country::EastTimor => "East Timor",Country::Mauritius => "Mauritius",Country::Eswatini => "Eswatini",Country::Djibouti => "Djibouti",Country::Fiji => "Fiji",Country::Cyprus => "Cyprus",Country::Comoros => "Comoros",Country::Bhutan => "Bhutan",Country::Guyana => "Guyana",Country::SolomonIslands => "Solomon Islands",Country::Macau => "Macau",Country::Luxembourg => "Luxembourg",Country::Montenegro => "Montenegro",Country::WesternSahara => "Western Sahara",Country::Suriname => "Suriname",Country::CapeVerde => "Cape Verde",Country::Malta => "Malta",Country::Transnistria => "Transnistria",Country::Brunei => "Brunei",Country::Belize => "Belize",Country::Bahamas => "Bahamas",Country::Maldives => "Maldives",Country::NorthernCyprus => "Northern Cyprus",Country::Iceland => "Iceland",Country::Vanuatu => "Vanuatu",Country::Barbados => "Barbados",Country::FrenchPolynesia => "French Polynesia",Country::NewCaledonia => "New Caledonia",Country::Abkhazia => "Abkhazia",Country::SaoTomeAndPrincipe => "São Tomé and Príncipe",Country::Samoa => "Samoa",Country::SaintLucia => "Saint Lucia",Country::Guam => "Guam",Country::Curacao => "Curaçao",Country::RepublicOfArtsakh => "Republic Of Artsakh",Country::Kiribati => "Kiribati",Country::Grenada => "Grenada",Country::Aruba => "Aruba",Country::SaintVincentAndTheGrenadines => "Saint Vincent and the Grenadines",Country::Jersey => "Jersey",Country::FSMicronesia => "FS Micronesia",Country::USVirginIslands => "US Virgin Islands",Country::Tonga => "Tonga",Country::AntiguaAndBarbuda => "Antigua and Barbuda",Country::Seychelles => "Seychelles",Country::IsleOfMan => "Isle of Man",Country::Andorra => "Andorra",Country::Dominica => "Dominica",Country::CaymanIslands => "Cayman Islands",Country::Bermuda => "Bermuda",Country::Guernsey => "Guernsey",Country::AmericanSamoa => "American Samoa",Country::NorthernMarianaIslands => "Northern Mariana Islands",Country::Greenland => "Greenland",Country::MarshallIslands => "Marshall Islands",Country::SaintKittsandNevis => "Saint Kitts and Nevis",Country::SouthOssetia => "South Ossetia",Country::FaroeIslands => "Faroe Islands",Country::TurksandCaicosIslands => "Turks and Caicos Islands",Country::SintMaarten => "Sint Maarten",Country::Liechtenstein => "Liechtenstein",Country::Monaco => "Monaco",Country::SaintMartin => "Saint Martin",Country::Gibraltar => "Gibraltar",Country::SanMarino => "San Marino",Country::AlandIslands => "Åland Islands",Country::BritishVirginIslands => "British Virgin Islands",Country::Palau => "Palau",Country::CookIslands => "Cook Islands",Country::Anguilla => "Anguilla",Country::Nauru => "Nauru",Country::WallisandFutuna => "Wallis and Futuna",Country::Tuvalu => "Tuvalu",Country::SaintBarthelemy => "Saint Barthélemy",Country::SaintPierreAndMiquelon => "Saint Pierre and Miquelon",Country::SaintHelenaAndTristanDaCunha => "Saint Helena and Tristan Da Cunha",Country::Montserrat => "Montserrat",Country::FalklandIslands => "Falkland Islands",Country::ChristmasIsland => "Christmas Island",Country::NorfolkIsland => "Norfolk Island",Country::Niue => "Niue",Country::Tokelau => "Tokelau",Country::VaticanCity => "Vatican City",Country::CocosKeelingIslands => "Cocos Keeling Islands",Country::PitcairnIslands => "Pitcairn Islands",};write!(f, "{}", s)}} - file addition: Cargo.toml[1.0]
[package]name = "countries"version = "0.1.0"authors = ["Eric Findlay <e.findlay@protonmail.ch>"]edition = "2018"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html[dependencies]serde = { version = "1.0.125", features = ["derive"] }serde_json = "1.0.64"