diff --git a/crates/iana-codegen/src/jose.rs b/crates/iana-codegen/src/jose.rs index 84185bb7..a23561f7 100644 --- a/crates/iana-codegen/src/jose.rs +++ b/crates/iana-codegen/src/jose.rs @@ -98,7 +98,7 @@ impl EnumEntry for WebEncryptionSignatureAlgorithm { } } Usage::Enc => Some("JsonWebEncryptionEnc"), - _ => None, + Usage::Jwk => None, } } diff --git a/crates/iana-codegen/src/main.rs b/crates/iana-codegen/src/main.rs index 02fb3d79..7e5c3981 100644 --- a/crates/iana-codegen/src/main.rs +++ b/crates/iana-codegen/src/main.rs @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![forbid(unsafe_code)] +#![deny(clippy::all)] +#![deny(rustdoc::broken_intra_doc_links)] +#![warn(clippy::pedantic)] + use std::{collections::HashMap, fmt::Display, path::PathBuf, sync::Arc}; use reqwest::Client; @@ -142,7 +147,7 @@ pub enum {} {{"#, } } -use self::{jose::*, oauth::*, traits::*}; +use self::traits::{EnumEntry, EnumMember, Section}; #[tracing::instrument(skip(client))] async fn generate_jose(client: &Arc, path: PathBuf) -> anyhow::Result<()> { @@ -154,17 +159,17 @@ async fn generate_jose(client: &Arc, path: PathBuf) -> anyhow::Result<() "https://www.iana.org/assignments/jose/jose.xhtml", client.clone(), ) - .load::() + .load::() .await? - .load::() + .load::() .await? - .load::() + .load::() .await? - .load::() + .load::() .await? - .load::() + .load::() .await? - .load::() + .load::() .await?; file.write(path).await?; @@ -182,15 +187,15 @@ async fn generate_oauth(client: &Arc, path: PathBuf) -> anyhow::Result<( "https://www.iana.org/assignments/jose/jose.xhtml", client.clone(), ) - .load::() + .load::() .await? - .load::() + .load::() .await? - .load::() + .load::() .await? - .load::() + .load::() .await? - .load::() + .load::() .await?; file.write(path).await?; diff --git a/crates/iana-codegen/src/traits.rs b/crates/iana-codegen/src/traits.rs index 6fec86e7..c5bf4fa0 100644 --- a/crates/iana-codegen/src/traits.rs +++ b/crates/iana-codegen/src/traits.rs @@ -25,6 +25,7 @@ pub struct Section { pub url: Option<&'static str>, } +#[must_use] pub const fn s(key: &'static str, doc: &'static str) -> Section { Section { key, @@ -45,6 +46,7 @@ pub trait EnumEntry: DeserializeOwned + Send + Sync { const URL: &'static str; const SECTIONS: &'static [Section]; + #[must_use] fn sections() -> Vec
{ Self::SECTIONS .iter() diff --git a/crates/iana/src/lib.rs b/crates/iana/src/lib.rs index 873d1d41..7b042c57 100644 --- a/crates/iana/src/lib.rs +++ b/crates/iana/src/lib.rs @@ -12,5 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![forbid(unsafe_code)] +#![deny(clippy::all)] +#![deny(rustdoc::broken_intra_doc_links)] +#![warn(clippy::pedantic)] +#![allow(clippy::module_name_repetitions)] + pub mod jose; pub mod oauth;