Skip to content

Commit

Permalink
Change MSRV to 1.81
Browse files Browse the repository at this point in the history
  • Loading branch information
rlebran committed Sep 25, 2024
1 parent 610c6d4 commit 2a600ad
Show file tree
Hide file tree
Showing 41 changed files with 88 additions and 141 deletions.
4 changes: 2 additions & 2 deletions apistos-core/src/api_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ mod test {
use crate::ApiComponent;

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_schema_vec_oas_3_0() {
#[derive(JsonSchema)]
struct TestChild {
Expand Down Expand Up @@ -600,7 +600,7 @@ mod test {
}

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_schema_vec_oas_3_1() {
#[derive(JsonSchema)]
struct TestChild {
Expand Down
2 changes: 1 addition & 1 deletion apistos-core/src/components/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub mod ipnetwork {
use serde_json::json;

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn ip_network_schema() {
#[derive(JsonSchema)]
struct Test {
Expand Down
2 changes: 1 addition & 1 deletion apistos-core/src/components/multipart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub mod tempfile {
use serde_json::json;

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn multipart_tempfile_schema() {
#[derive(JsonSchema)]
struct Test {
Expand Down
4 changes: 0 additions & 4 deletions apistos-gen-test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#![allow(deprecated)]
#![allow(dead_code)]
#![allow(clippy::expect_used)]

#[cfg(test)]
pub(crate) mod tests;
#[cfg(test)]
Expand Down
3 changes: 1 addition & 2 deletions apistos-gen-test/src/tests/api_callback_oas_3_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use apistos::{JsonSchema, OpenApiVersion};
use apistos_core::PathItemDefinition;
use apistos_gen::{api_callback, api_operation, ApiComponent};

#[allow(clippy::todo)]
#[expect(clippy::todo)]
mod test_models {
use actix_web::http::header::{Header, HeaderName, HeaderValue, InvalidHeaderValue, TryIntoHeaderValue};
use std::fmt::{Display, Formatter};
Expand Down Expand Up @@ -83,7 +83,6 @@ mod test_models {
}

#[test]
#[allow(dead_code)]
fn api_callback() {
use actix_web::web::Header;
use test_models::OrganizationSlug;
Expand Down
3 changes: 1 addition & 2 deletions apistos-gen-test/src/tests/api_callback_oas_3_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use apistos::{JsonSchema, OpenApiVersion};
use apistos_core::PathItemDefinition;
use apistos_gen::{api_callback, api_operation, ApiComponent};

#[allow(clippy::todo)]
#[expect(clippy::todo)]
mod test_models {
use actix_web::http::header::{Header, HeaderName, HeaderValue, InvalidHeaderValue, TryIntoHeaderValue};
use std::fmt::{Display, Formatter};
Expand Down Expand Up @@ -83,7 +83,6 @@ mod test_models {
}

#[test]
#[allow(dead_code)]
fn api_callback() {
use actix_web::web::Header;
use test_models::OrganizationSlug;
Expand Down
10 changes: 7 additions & 3 deletions apistos-gen-test/src/tests/api_component_derive_oas_3_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use apistos_core::ApiComponent;
use apistos_gen::ApiComponent;

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_derive() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -43,7 +43,7 @@ fn api_component_derive() {
}

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_derive_with_generic() {
#[derive(JsonSchema, ApiComponent)]
struct Name<T>
Expand Down Expand Up @@ -115,6 +115,7 @@ fn api_component_derive_with_generic() {
}

#[test]
#[expect(dead_code)]
fn api_component_derive_with_flatten() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -165,6 +166,7 @@ fn api_component_derive_with_flatten() {
}

#[test]
#[expect(dead_code)]
fn api_component_derive_with_deprecated_field() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -204,6 +206,7 @@ fn api_component_derive_with_deprecated_field() {
}

#[test]
#[expect(dead_code)]
fn api_component_derive_with_format() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -242,6 +245,7 @@ fn api_component_derive_with_format() {
}

#[test]
#[expect(dead_code)]
fn api_component_derive_recursive() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -724,7 +728,7 @@ fn api_component_derive_named_tagged_enums() {
);
}

#[allow(unused_qualifications)]
#[expect(unused_qualifications)]
#[test]
fn api_component_derive_named_enums_deep() {
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize, ApiComponent, JsonSchema)]
Expand Down
10 changes: 7 additions & 3 deletions apistos-gen-test/src/tests/api_component_derive_oas_3_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use apistos_core::ApiComponent;
use apistos_gen::ApiComponent;

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_derive() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -44,7 +44,7 @@ fn api_component_derive() {
}

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_derive_with_generic() {
#[derive(JsonSchema, ApiComponent)]
struct Name<T>
Expand Down Expand Up @@ -117,6 +117,7 @@ fn api_component_derive_with_generic() {
}

#[test]
#[expect(dead_code)]
fn api_component_derive_with_flatten() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -168,6 +169,7 @@ fn api_component_derive_with_flatten() {
}

#[test]
#[expect(dead_code)]
fn api_component_derive_with_deprecated_field() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -210,6 +212,7 @@ fn api_component_derive_with_deprecated_field() {
}

#[test]
#[expect(dead_code)]
fn api_component_derive_with_format() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -249,6 +252,7 @@ fn api_component_derive_with_format() {
}

#[test]
#[expect(dead_code)]
fn api_component_derive_recursive() {
#[derive(JsonSchema, ApiComponent)]
struct Name {
Expand Down Expand Up @@ -747,7 +751,7 @@ fn api_component_derive_named_tagged_enums() {
);
}

#[allow(unused_qualifications)]
#[expect(unused_qualifications)]
#[test]
fn api_component_derive_named_enums_deep() {
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize, ApiComponent, JsonSchema)]
Expand Down
7 changes: 4 additions & 3 deletions apistos-gen-test/src/tests/api_cookie_derive_oas_3_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use apistos_core::ApiComponent;
use apistos_gen::ApiCookie;

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_cookie_derive() {
#[derive(JsonSchema, ApiCookie)]
#[openapi_cookie(
Expand Down Expand Up @@ -55,7 +55,8 @@ fn api_cookie_derive() {
}

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
#[expect(deprecated)]
fn api_cookie_derive_deprecated() {
#[derive(JsonSchema, ApiCookie)]
#[openapi_cookie(
Expand Down Expand Up @@ -105,7 +106,7 @@ fn api_cookie_derive_deprecated() {
}

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_cookie_derive_deprecated_attribute() {
#[derive(JsonSchema, ApiCookie)]
#[openapi_cookie(
Expand Down
7 changes: 4 additions & 3 deletions apistos-gen-test/src/tests/api_cookie_derive_oas_3_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use apistos_core::ApiComponent;
use apistos_gen::ApiCookie;

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_cookie_derive() {
#[derive(JsonSchema, ApiCookie)]
#[openapi_cookie(
Expand Down Expand Up @@ -57,7 +57,8 @@ fn api_cookie_derive() {
}

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
#[expect(deprecated)]
fn api_cookie_derive_deprecated() {
#[derive(JsonSchema, ApiCookie)]
#[openapi_cookie(
Expand Down Expand Up @@ -109,7 +110,7 @@ fn api_cookie_derive_deprecated() {
}

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_cookie_derive_deprecated_attribute() {
#[derive(JsonSchema, ApiCookie)]
#[openapi_cookie(
Expand Down
4 changes: 2 additions & 2 deletions apistos-gen-test/src/tests/api_error_derive_oas_3_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use schemars::JsonSchema;
use std::collections::{BTreeMap, HashSet};

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_derive() {
#[allow(clippy::duplicated_attributes)]
#[derive(ApiErrorComponent)]
Expand Down Expand Up @@ -53,7 +53,7 @@ fn api_component_derive() {
}

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_with_schema() {
#[derive(JsonSchema)]
struct AuthorizeError {
Expand Down
6 changes: 4 additions & 2 deletions apistos-gen-test/src/tests/api_error_derive_oas_3_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ use schemars::JsonSchema;
use std::collections::{BTreeMap, HashSet};

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_derive() {
#[allow(clippy::duplicated_attributes)]
#[derive(ApiErrorComponent)]
#[openapi_error(
status(code = 403),
Expand Down Expand Up @@ -52,14 +53,15 @@ fn api_component_derive() {
}

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_component_with_schema() {
#[derive(JsonSchema)]
struct AuthorizeError {
reason: String,
code: String,
}

#[allow(clippy::duplicated_attributes)]
#[derive(ApiErrorComponent)]
#[openapi_error(status(code = 403), status(code = 409, description = "Too many requests"))]
enum ErrorResponse {
Expand Down
2 changes: 1 addition & 1 deletion apistos-gen-test/src/tests/api_header_derive_oas_3_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use apistos_core::ApiComponent;
use apistos_gen::ApiHeader;

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_header_derive() {
#[derive(JsonSchema, ApiHeader)]
#[openapi_header(
Expand Down
2 changes: 1 addition & 1 deletion apistos-gen-test/src/tests/api_header_derive_oas_3_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use apistos_core::ApiComponent;
use apistos_gen::ApiHeader;

#[test]
#[allow(dead_code)]
#[expect(dead_code)]
fn api_header_derive() {
#[derive(JsonSchema, ApiHeader)]
#[openapi_header(
Expand Down
Loading

0 comments on commit 2a600ad

Please sign in to comment.