Do more linting

This commit is contained in:
Smitty 2021-05-28 13:04:06 -04:00
parent 588a5777db
commit b561b48aa3
3 changed files with 40 additions and 0 deletions

View file

@ -98,6 +98,7 @@ impl ToString for Sid {
macro_rules! qid_consts (
{ $($key:ident => $value:expr),+, } => {
$(
#[allow(missing_docs)]
pub const $key: Qid = Qid($value);
)+
};
@ -105,6 +106,7 @@ macro_rules! qid_consts (
macro_rules! pid_consts (
{ $($key:ident => $value:expr),+, } => {
$(
#[allow(missing_docs)]
pub const $key: Pid = Pid($value);
)+
};
@ -128,6 +130,7 @@ macro_rules! qid_unit_suffixes {
impl Qid {
/// If the Qid is a commonly used unit on Wikidata, get it as a unit suffix.
#[must_use]
pub fn unit_suffix(self) -> Option<&'static str> {
consts::unit_suffix(self)
}