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>,