mirror of https://github.com/fafhrd91/actix-web
test(multipart,derive): move trybuild tests
This commit is contained in:
parent
e6d09913d9
commit
c69afd484e
|
|
@ -165,27 +165,25 @@ dependencies = [
|
||||||
"mime",
|
"mime",
|
||||||
"multer",
|
"multer",
|
||||||
"rand 0.10.1",
|
"rand 0.10.1",
|
||||||
|
"rustversion-msrv",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_plain",
|
"serde_plain",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
|
"trybuild",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-multipart-derive"
|
name = "actix-multipart-derive"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-multipart",
|
|
||||||
"actix-web",
|
|
||||||
"bytesize",
|
"bytesize",
|
||||||
"darling",
|
"darling",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"rustversion-msrv",
|
|
||||||
"syn",
|
"syn",
|
||||||
"trybuild",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,5 @@ proc-macro2 = "1"
|
||||||
quote = "1"
|
quote = "1"
|
||||||
syn = "2"
|
syn = "2"
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
actix-multipart = "0.8"
|
|
||||||
actix-web = "4"
|
|
||||||
rustversion-msrv = "0.100"
|
|
||||||
trybuild = "1"
|
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ struct ParsedField<'t> {
|
||||||
///
|
///
|
||||||
/// Each field type should implement the `FieldReader` trait:
|
/// Each field type should implement the `FieldReader` trait:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```ignore
|
||||||
/// use actix_multipart::form::{tempfile::TempFile, text::Text, MultipartForm};
|
/// use actix_multipart::form::{tempfile::TempFile, text::Text, MultipartForm};
|
||||||
///
|
///
|
||||||
/// #[derive(MultipartForm)]
|
/// #[derive(MultipartForm)]
|
||||||
|
|
@ -71,7 +71,7 @@ struct ParsedField<'t> {
|
||||||
/// A [`Vec`] field corresponds to an upload with multiple parts under the [same field
|
/// A [`Vec`] field corresponds to an upload with multiple parts under the [same field
|
||||||
/// name](https://www.rfc-editor.org/rfc/rfc7578#section-4.3).
|
/// name](https://www.rfc-editor.org/rfc/rfc7578#section-4.3).
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```ignore
|
||||||
/// use actix_multipart::form::{tempfile::TempFile, text::Text, MultipartForm};
|
/// use actix_multipart::form::{tempfile::TempFile, text::Text, MultipartForm};
|
||||||
///
|
///
|
||||||
/// #[derive(MultipartForm)]
|
/// #[derive(MultipartForm)]
|
||||||
|
|
@ -85,7 +85,7 @@ struct ParsedField<'t> {
|
||||||
///
|
///
|
||||||
/// You can use the `#[multipart(rename = "foo")]` attribute to receive a field by a different name.
|
/// You can use the `#[multipart(rename = "foo")]` attribute to receive a field by a different name.
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```ignore
|
||||||
/// use actix_multipart::form::{tempfile::TempFile, MultipartForm};
|
/// use actix_multipart::form::{tempfile::TempFile, MultipartForm};
|
||||||
///
|
///
|
||||||
/// #[derive(MultipartForm)]
|
/// #[derive(MultipartForm)]
|
||||||
|
|
@ -102,7 +102,7 @@ struct ParsedField<'t> {
|
||||||
///
|
///
|
||||||
/// Note: the form is also subject to the global limits configured using `MultipartFormConfig`.
|
/// Note: the form is also subject to the global limits configured using `MultipartFormConfig`.
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```ignore
|
||||||
/// use actix_multipart::form::{tempfile::TempFile, text::Text, MultipartForm};
|
/// use actix_multipart::form::{tempfile::TempFile, text::Text, MultipartForm};
|
||||||
///
|
///
|
||||||
/// #[derive(MultipartForm)]
|
/// #[derive(MultipartForm)]
|
||||||
|
|
@ -120,7 +120,7 @@ struct ParsedField<'t> {
|
||||||
/// By default fields with an unknown name are ignored. They can be rejected using the
|
/// By default fields with an unknown name are ignored. They can be rejected using the
|
||||||
/// `#[multipart(deny_unknown_fields)]` attribute:
|
/// `#[multipart(deny_unknown_fields)]` attribute:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```ignore
|
||||||
/// # use actix_multipart::form::MultipartForm;
|
/// # use actix_multipart::form::MultipartForm;
|
||||||
/// #[derive(MultipartForm)]
|
/// #[derive(MultipartForm)]
|
||||||
/// #[multipart(deny_unknown_fields)]
|
/// #[multipart(deny_unknown_fields)]
|
||||||
|
|
@ -138,7 +138,7 @@ struct ParsedField<'t> {
|
||||||
///
|
///
|
||||||
/// Note that `Vec` fields will ignore this option.
|
/// Note that `Vec` fields will ignore this option.
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```ignore
|
||||||
/// # use actix_multipart::form::MultipartForm;
|
/// # use actix_multipart::form::MultipartForm;
|
||||||
/// #[derive(MultipartForm)]
|
/// #[derive(MultipartForm)]
|
||||||
/// #[multipart(duplicate_field = "deny")]
|
/// #[multipart(duplicate_field = "deny")]
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,15 @@ homepage.workspace = true
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
rust-version.workspace = true
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
||||||
|
[[test]]
|
||||||
|
name = "trybuild"
|
||||||
|
required-features = ["derive", "tempfile"]
|
||||||
|
|
||||||
[package.metadata.cargo_check_external_types]
|
[package.metadata.cargo_check_external_types]
|
||||||
allowed_external_types = [
|
allowed_external_types = [
|
||||||
"actix_http::*",
|
"actix_http::*",
|
||||||
|
|
@ -68,8 +73,10 @@ env_logger = "0.11"
|
||||||
futures-test = "0.3"
|
futures-test = "0.3"
|
||||||
futures-util = { version = "0.3.17", default-features = false, features = ["alloc"] }
|
futures-util = { version = "0.3.17", default-features = false, features = ["alloc"] }
|
||||||
multer = "3"
|
multer = "3"
|
||||||
|
rustversion-msrv = "0.100"
|
||||||
tokio = { version = "1.38.2", features = ["sync"] }
|
tokio = { version = "1.38.2", features = ["sync"] }
|
||||||
tokio-stream = "0.1"
|
tokio-stream = "0.1"
|
||||||
|
trybuild = "1"
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue