add test for Garde

This commit is contained in:
gengteng
2023-10-07 21:11:26 +08:00
parent 21ee4e7913
commit 2f1aa1060f
16 changed files with 112 additions and 78 deletions

View File

@@ -49,9 +49,9 @@
use crate::{HasValidate, HasValidateArgs};
use axum_msgpack::{MsgPack, MsgPackRaw};
use validator::{Validate, ValidateArgs};
use validator::ValidateArgs;
impl<T: Validate> HasValidate for MsgPack<T> {
impl<T> HasValidate for MsgPack<T> {
type Validate = T;
fn get_validate(&self) -> &T {
&self.0
@@ -65,7 +65,7 @@ impl<'v, T: ValidateArgs<'v>> HasValidateArgs<'v> for MsgPack<T> {
}
}
impl<T: Validate> HasValidate for MsgPackRaw<T> {
impl<T> HasValidate for MsgPackRaw<T> {
type Validate = T;
fn get_validate(&self) -> &T {
&self.0