From 44a7ac07036915263f93e43f572dca8446d7ef9f Mon Sep 17 00:00:00 2001 From: strawberry Date: Fri, 15 Nov 2024 09:40:04 -0500 Subject: [PATCH] add debug_assert is_sorted for inline content types Signed-off-by: strawberry --- src/core/utils/content_disposition.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/utils/content_disposition.rs b/src/core/utils/content_disposition.rs index a2fe923c..3a264a74 100644 --- a/src/core/utils/content_disposition.rs +++ b/src/core/utils/content_disposition.rs @@ -45,9 +45,10 @@ pub fn content_disposition_type(content_type: Option<&str>) -> ContentDispositio return ContentDispositionType::Attachment; }; - // is_sorted is unstable - /* debug_assert!(ALLOWED_INLINE_CONTENT_TYPES.is_sorted(), - * "ALLOWED_INLINE_CONTENT_TYPES is not sorted"); */ + debug_assert!( + ALLOWED_INLINE_CONTENT_TYPES.is_sorted(), + "ALLOWED_INLINE_CONTENT_TYPES is not sorted" + ); let content_type: Cow<'_, str> = content_type .split(';')