@@ -205,16 +205,6 @@ where
205205 /// validity, this function offers complete control over these parameters.
206206 /// If this level of control is not needed, use [`CertificateAuthority::new`]
207207 /// instead.
208- //
209- // SAFETY: We purposefully allow the `clippy::unwrap_in_result` lint below in this function.
210- // We can use expect here, because the subject name is defined as a constant which must be able
211- // to be parsed.
212- //
213- // FIXME (@Techassi): This attribute can be used on individual unwrap and expect calls since
214- // Rust 1.91.0. We should move this attribute to not contaminate an unnecessarily large scope
215- // once we bump the toolchain to 1.91.0.
216- // See https://github.com/rust-lang/rust-clippy/pull/15445
217- #[ allow( clippy:: unwrap_in_result) ]
218208 #[ instrument( name = "create_certificate_authority_with" , skip( signing_key_pair) ) ]
219209 pub fn new_with ( signing_key_pair : S , serial_number : u64 , validity : Duration ) -> Result < Self > {
220210 let serial_number = SerialNumber :: from ( serial_number) ;
@@ -223,6 +213,10 @@ where
223213 // We don't allow customization of the CA subject by callers. Every CA
224214 // created by us should contain the same subject consisting a common set
225215 // of distinguished names (DNs).
216+ // SAFETY: We purposefully allow the `clippy::unwrap_in_result` lint below.
217+ // We can use expect here, because the subject name is defined as a constant which must be
218+ // able to be parsed.
219+ #[ allow( clippy:: unwrap_in_result) ]
226220 let subject = Name :: from_str ( SDP_ROOT_CA_SUBJECT )
227221 . expect ( "the constant SDP_ROOT_CA_SUBJECT must be a valid subject" ) ;
228222
0 commit comments