Replace clippy allow annotation with expect (fixes #5012) (#5048)

This commit is contained in:
Nutomic 2024-09-24 19:29:02 +02:00 committed by GitHub
parent 61a02482ff
commit f6a24e133a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
60 changed files with 59 additions and 111 deletions

View file

@ -265,8 +265,6 @@ pub async fn local_user_view_from_jwt(
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;

View file

@ -34,7 +34,7 @@ use lemmy_db_views::structs::LocalUserView;
use lemmy_utils::{error::LemmyResult, LemmyErrorType, CACHE_DURATION_API}; use lemmy_utils::{error::LemmyResult, LemmyErrorType, CACHE_DURATION_API};
use serial_test::serial; use serial_test::serial;
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
async fn create_test_site(context: &Data<LemmyContext>) -> LemmyResult<(Instance, LocalUserView)> { async fn create_test_site(context: &Data<LemmyContext>) -> LemmyResult<(Instance, LocalUserView)> {
let pool = &mut context.pool(); let pool = &mut context.pool();
@ -109,7 +109,7 @@ async fn signup(
Ok((local_user, application)) Ok((local_user, application))
} }
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
async fn get_application_statuses( async fn get_application_statuses(
context: &Data<LemmyContext>, context: &Data<LemmyContext>,
admin: LocalUserView, admin: LocalUserView,
@ -138,10 +138,9 @@ async fn get_application_statuses(
Ok((application_count, unread_applications, all_applications)) Ok((application_count, unread_applications, all_applications))
} }
#[allow(clippy::indexing_slicing)]
#[allow(clippy::unwrap_used)]
#[tokio::test]
#[serial] #[serial]
#[tokio::test]
#[expect(clippy::indexing_slicing)]
async fn test_application_approval() -> LemmyResult<()> { async fn test_application_approval() -> LemmyResult<()> {
let context = LemmyContext::init_test_context().await; let context = LemmyContext::init_test_context().await;
let pool = &mut context.pool(); let pool = &mut context.pool();

View file

@ -42,7 +42,7 @@ pub async fn get_sitemap(context: Data<LemmyContext>) -> LemmyResult<HttpRespons
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
pub(crate) mod tests { pub(crate) mod tests {
use crate::sitemap::generate_urlset; use crate::sitemap::generate_urlset;

View file

@ -69,8 +69,7 @@ impl Claims {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{claims::Claims, context::LemmyContext}; use crate::{claims::Claims, context::LemmyContext};

View file

@ -471,8 +471,7 @@ pub async fn replace_image(
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -1067,8 +1067,7 @@ fn build_proxied_image_url(
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;

View file

@ -189,8 +189,6 @@ fn validate_create_payload(local_site: &LocalSite, create_site: &CreateSite) ->
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::site::create::validate_create_payload; use crate::site::create::validate_create_payload;

View file

@ -48,8 +48,6 @@ fn not_zero(val: Option<i32>) -> Option<i32> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::site::{application_question_check, not_zero, site_default_post_listing_type_check}; use crate::site::{application_question_check, not_zero, site_default_post_listing_type_check};

View file

@ -241,8 +241,6 @@ fn validate_update_payload(local_site: &LocalSite, edit_site: &EditSite) -> Lemm
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::site::update::validate_update_payload; use crate::site::update::validate_update_payload;

View file

@ -123,7 +123,6 @@ impl InCommunity for AnnouncableActivities {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -307,8 +307,9 @@ where
}); });
Ok(failed_items.into_iter().join(",")) Ok(failed_items.into_iter().join(","))
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::api::user_settings_backup::{export_settings, import_settings, UserSettingsBackup}; use crate::api::user_settings_backup::{export_settings, import_settings, UserSettingsBackup};

View file

@ -98,7 +98,7 @@ impl Collection for ApubCommunityModerators {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;

View file

@ -120,8 +120,7 @@ pub(crate) async fn get_apub_community_featured(
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
pub(crate) mod tests { pub(crate) mod tests {
use super::*; use super::*;

View file

@ -75,7 +75,7 @@ impl<S: ValidGrouping<(), IsAggregate = is_aggregate::No>> ValidGrouping<()>
type IsAggregate = is_aggregate::No; type IsAggregate = is_aggregate::No;
} }
#[allow(non_camel_case_types)] #[expect(non_camel_case_types)]
#[derive(QueryId, Clone, Copy, Debug)] #[derive(QueryId, Clone, Copy, Debug)]
pub struct current_value; pub struct current_value;

View file

@ -30,8 +30,7 @@ impl CommentAggregates {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -36,8 +36,7 @@ impl CommunityAggregates {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -20,8 +20,7 @@ impl PersonAggregates {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -49,8 +49,8 @@ impl PostAggregates {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -15,8 +15,8 @@ impl SiteAggregates {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -58,8 +58,7 @@ impl ReceivedActivity {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;

View file

@ -392,8 +392,8 @@ async fn convert_read_languages(
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;

View file

@ -51,8 +51,6 @@ impl CaptchaAnswer {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -196,8 +196,7 @@ impl Saveable for CommentSaved {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -431,7 +431,6 @@ impl ApubActor for Community {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{
source::{ source::{

View file

@ -48,8 +48,7 @@ impl FederationAllowList {
} }
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -41,8 +41,8 @@ impl Language {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{source::language::Language, utils::build_db_pool_for_tests}; use crate::{source::language::Language, utils::build_db_pool_for_tests};

View file

@ -369,7 +369,6 @@ pub struct UserBackupLists {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{
source::{ source::{

View file

@ -465,8 +465,7 @@ impl Crud for AdminPurgeComment {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -42,8 +42,6 @@ impl PasswordResetRequest {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -235,7 +235,6 @@ impl PersonFollower {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -392,8 +392,7 @@ impl PostHide {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -80,8 +80,7 @@ impl Reportable for PostReport {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;

View file

@ -85,8 +85,7 @@ impl PrivateMessage {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -27,7 +27,6 @@ pub mod newtypes;
pub mod sensitive; pub mod sensitive;
#[cfg(feature = "full")] #[cfg(feature = "full")]
#[rustfmt::skip] #[rustfmt::skip]
#[allow(clippy::wildcard_imports)]
pub mod schema; pub mod schema;
#[cfg(feature = "full")] #[cfg(feature = "full")]
pub mod aliases { pub mod aliases {

View file

@ -191,13 +191,13 @@ impl Display for DbUrl {
} }
// the project doesn't compile with From // the project doesn't compile with From
#[allow(clippy::from_over_into)] #[expect(clippy::from_over_into)]
impl Into<DbUrl> for Url { impl Into<DbUrl> for Url {
fn into(self) -> DbUrl { fn into(self) -> DbUrl {
DbUrl(Box::new(self)) DbUrl(Box::new(self))
} }
} }
#[allow(clippy::from_over_into)] #[expect(clippy::from_over_into)]
impl Into<Url> for DbUrl { impl Into<Url> for DbUrl {
fn into(self) -> Url { fn into(self) -> Url {
*self.0 *self.0

View file

@ -595,7 +595,6 @@ impl<RF, LF> Queries<RF, LF> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;

View file

@ -259,8 +259,8 @@ impl CommentReportQuery {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -422,8 +422,8 @@ impl<'a> CommentQuery<'a> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -284,8 +284,8 @@ impl PostReportQuery {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -739,7 +739,7 @@ impl<'a> PostQuery<'a> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
mod tests { mod tests {
use crate::{ use crate::{
post_view::{PaginationCursorData, PostQuery, PostView}, post_view::{PaginationCursorData, PostQuery, PostView},

View file

@ -111,8 +111,8 @@ impl PrivateMessageReportQuery {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::private_message_report_view::PrivateMessageReportQuery; use crate::private_message_report_view::PrivateMessageReportQuery;

View file

@ -173,8 +173,8 @@ impl PrivateMessageQuery {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{private_message_view::PrivateMessageQuery, structs::PrivateMessageView}; use crate::{private_message_view::PrivateMessageQuery, structs::PrivateMessageView};

View file

@ -135,8 +135,7 @@ impl RegistrationApplicationQuery {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::registration_application_view::{ use crate::registration_application_view::{

View file

@ -83,8 +83,7 @@ impl VoteView {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::structs::VoteView; use crate::structs::VoteView;

View file

@ -303,7 +303,6 @@ impl CommentReplyQuery {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{comment_reply_view::CommentReplyQuery, structs::CommentReplyView}; use crate::{comment_reply_view::CommentReplyQuery, structs::CommentReplyView};

View file

@ -248,8 +248,7 @@ impl<'a> CommunityQuery<'a> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{community_view::CommunityQuery, structs::CommunityView}; use crate::{community_view::CommunityQuery, structs::CommunityView};

View file

@ -303,7 +303,6 @@ impl PersonMentionQuery {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{person_mention_view::PersonMentionQuery, structs::PersonMentionView}; use crate::{person_mention_view::PersonMentionQuery, structs::PersonMentionView};

View file

@ -164,7 +164,7 @@ impl PersonQuery {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;

View file

@ -222,8 +222,8 @@ impl<T: DataSource> CommunityInboxCollector<T> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;
use lemmy_db_schema::{ use lemmy_db_schema::{

View file

@ -192,8 +192,8 @@ impl SendManager {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod test { mod test {
use super::*; use super::*;

View file

@ -439,8 +439,8 @@ impl InstanceWorker {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)] #[expect(clippy::indexing_slicing)]
mod test { mod test {
use super::*; use super::*;

View file

@ -221,8 +221,6 @@ fn parse_ip(addr: &str) -> Option<IpAddr> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
#[test] #[test]

View file

@ -136,7 +136,6 @@ impl<K: Eq + Hash, C: MapLevel> MapLevel for Map<K, C> {
.entry(addr_part) .entry(addr_part)
.or_insert(RateLimitedGroup::new(now, adjusted_configs)); .or_insert(RateLimitedGroup::new(now, adjusted_configs));
#[allow(clippy::indexing_slicing)]
let total_passes = group.check_total(action_type, now, adjusted_configs[action_type]); let total_passes = group.check_total(action_type, now, adjusted_configs[action_type]);
let children_pass = group.children.check( let children_pass = group.children.check(
@ -161,7 +160,6 @@ impl<K: Eq + Hash, C: MapLevel> MapLevel for Map<K, C> {
// Evaluated if `some_children_remaining` is false // Evaluated if `some_children_remaining` is false
let total_has_refill_in_future = || { let total_has_refill_in_future = || {
group.total.into_iter().any(|(action_type, bucket)| { group.total.into_iter().any(|(action_type, bucket)| {
#[allow(clippy::indexing_slicing)]
let config = configs[action_type]; let config = configs[action_type];
bucket.update(now, config).tokens != config.capacity bucket.update(now, config).tokens != config.capacity
}) })
@ -214,7 +212,6 @@ impl<C: Default> RateLimitedGroup<C> {
now: InstantSecs, now: InstantSecs,
config: BucketConfig, config: BucketConfig,
) -> bool { ) -> bool {
#[allow(clippy::indexing_slicing)] // `EnumMap` has no `get` function
let bucket = &mut self.total[action_type]; let bucket = &mut self.total[action_type];
let new_bucket = bucket.update(now, config); let new_bucket = bucket.update(now, config);
@ -311,8 +308,7 @@ fn split_ipv6(ip: Ipv6Addr) -> ([u8; 6], u8, u8) {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use super::{ActionType, BucketConfig, InstantSecs, RateLimitState, RateLimitedGroup}; use super::{ActionType, BucketConfig, InstantSecs, RateLimitState, RateLimitedGroup};
@ -361,7 +357,6 @@ mod tests {
assert!(post_passed); assert!(post_passed);
} }
#[allow(clippy::indexing_slicing)]
let expected_buckets = |factor: u32, tokens_consumed: u32| { let expected_buckets = |factor: u32, tokens_consumed: u32| {
let adjusted_configs = bucket_configs.map(|_, config| BucketConfig { let adjusted_configs = bucket_configs.map(|_, config| BucketConfig {
capacity: config.capacity.saturating_mul(factor), capacity: config.capacity.saturating_mul(factor),

View file

@ -107,8 +107,7 @@ pub fn markdown_check_for_blocked_urls(text: &str, blocklist: &RegexSet) -> Lemm
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;

View file

@ -134,8 +134,6 @@ pub fn add(markdown_parser: &mut MarkdownIt) {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::utils::markdown::spoiler_rule::add; use crate::utils::markdown::spoiler_rule::add;

View file

@ -34,8 +34,7 @@ pub fn scrape_text_for_mentions(text: &str) -> Vec<MentionData> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::indexing_slicing)]
#[allow(clippy::indexing_slicing)]
mod test { mod test {
use crate::utils::mention::scrape_text_for_mentions; use crate::utils::mention::scrape_text_for_mentions;

View file

@ -61,8 +61,7 @@ pub(crate) fn slurs_vec_to_str(slurs: &[&str]) -> String {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod test { mod test {
use crate::utils::slurs::{remove_slurs, slur_check, slurs_vec_to_str}; use crate::utils::slurs::{remove_slurs, slur_check, slurs_vec_to_str};

View file

@ -351,7 +351,6 @@ pub fn build_url_str_without_scheme(url_str: &str) -> LemmyResult<String> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::{ use crate::{

View file

@ -605,7 +605,6 @@ async fn build_update_instance_form(
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use crate::scheduled_tasks::build_update_instance_form; use crate::scheduled_tasks::build_update_instance_form;

View file

@ -97,8 +97,7 @@ where
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)] #[expect(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;