From b694c9317a01dc0bcea8cecee3bf1e9ded1b5d8d Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 4 Jan 2024 03:32:24 +0000 Subject: [PATCH] mark Cors builder as must_use --- actix-cors/CHANGES.md | 2 ++ actix-cors/src/builder.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/actix-cors/CHANGES.md b/actix-cors/CHANGES.md index e62706564..5ad468a63 100644 --- a/actix-cors/CHANGES.md +++ b/actix-cors/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased +- `Cors` is now marked `#[must_use]`. + ## 0.6.5 - Fix `Vary` header when Private Network Access is enabled. diff --git a/actix-cors/src/builder.rs b/actix-cors/src/builder.rs index a71a9255d..08e0895a0 100644 --- a/actix-cors/src/builder.rs +++ b/actix-cors/src/builder.rs @@ -82,6 +82,7 @@ static ALL_METHODS_SET: Lazy> = Lazy::new(|| { /// /// [Fetch Standard CORS protocol]: https://fetch.spec.whatwg.org/#http-cors-protocol #[derive(Debug)] +#[must_use] pub struct Cors { inner: Rc, error: Option>,