Skip to content

Commit 9165d87

Browse files
committed
Update extract.rs
1 parent 884772a commit 9165d87

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

crates/rustapi-core/src/extract.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,7 @@ impl<T: DeserializeOwned + Validatable + Send> FromRequest for ValidatedJson<T>
266266
let value: T = json::from_slice(&body)?;
267267

268268
// Then, validate it using the unified Validatable trait
269-
if let Err(e) = value.do_validate() {
270-
return Err(e);
271-
}
269+
value.do_validate()?;
272270

273271
Ok(ValidatedJson(value))
274272
}

0 commit comments

Comments
 (0)