From 4d7f63203724d246d5b58a50a57b6e7d42ab7951 Mon Sep 17 00:00:00 2001 From: JJ Date: Sat, 17 Jun 2023 14:23:06 -0700 Subject: minor idiomatic changes --- parse_wiki_text/src/display.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parse_wiki_text') diff --git a/parse_wiki_text/src/display.rs b/parse_wiki_text/src/display.rs index cc2b258..4c1f03a 100644 --- a/parse_wiki_text/src/display.rs +++ b/parse_wiki_text/src/display.rs @@ -6,8 +6,8 @@ use crate::{Node, Parameter}; use std::fmt::Error; -// why is std::other::Result not usable when i import std::fmt::Result? +// why is core::result::Result not usable when i import std::fmt::Result? impl std::fmt::Display for Node<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { return match self { @@ -186,7 +186,7 @@ fn get<'a>(parameters: &'a Vec, index: usize) -> Result<&'a str, Erro } -fn get_language<'a>(country_code: &'a str) -> &'a str { +fn get_language(country_code: &str) -> &'static str { return "English"; // todo: implement necessary parts of isolang // if country_code.len() == 3 { -- cgit v1.2.3-70-g09d2