From 0af8f50086154f6878e7a3c7f8ae6153ec1b9361 Mon Sep 17 00:00:00 2001 From: Bilal Mahmoud Date: Sat, 17 Aug 2024 14:28:56 +0200 Subject: [PATCH] Add absolute import for `Result` (#307) This changes it so that the `Result` used in the derived schema code is using the absolute path to the `Result` enum, otherwise type aliases, such as: `error_stack::Result` cannot be used. --- schemars_derive/src/schema_exprs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemars_derive/src/schema_exprs.rs b/schemars_derive/src/schema_exprs.rs index 1f5df99c..3278e994 100644 --- a/schemars_derive/src/schema_exprs.rs +++ b/schemars_derive/src/schema_exprs.rs @@ -556,7 +556,7 @@ fn field_default_expr(field: &Field, container_has_default: bool) -> Option { - fn serialize(&self, serializer: S) -> Result + fn serialize(&self, serializer: S) -> core::result::Result where S: serde::Serializer {