From 58722074ccd0d781bafcdbf21d38b59f07c2a5b8 Mon Sep 17 00:00:00 2001 From: Markus Korn Date: Mon, 7 Oct 2024 12:40:23 +0200 Subject: [PATCH] fix minijinja-capi: fix typo in error enum (fixes #591) (#592) changed the bad serializtion error to be `mj_err_kind::MJ_ERROR_KIND_BAD_SERIALIZTION` --- minijinja-cabi/include/minijinja.h | 8 ++++---- minijinja-cabi/src/error.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/minijinja-cabi/include/minijinja.h b/minijinja-cabi/include/minijinja.h index 84dfc674..348ea95c 100644 --- a/minijinja-cabi/include/minijinja.h +++ b/minijinja-cabi/include/minijinja.h @@ -35,7 +35,7 @@ typedef enum mj_err_kind { MJ_ERR_KIND_UNKNOWN_METHOD, MJ_ERR_KIND_BAD_ESCAPE, MJ_ERR_KIND_UNDEFINED_ERROR, - KJ_ERROR_KIND_BAD_SERIALIZTION, + MJ_ERROR_KIND_BAD_SERIALIZTION, MJ_ERR_KIND_BAD_INCLUDE, MJ_ERR_KIND_EVAL_BLOCK, MJ_ERR_KIND_CANNOT_UNPACK, @@ -414,7 +414,7 @@ MINIJINJA_API char *mj_value_to_str(struct mj_value value); MINIJINJA_API struct mj_value_iter *mj_value_try_iter(struct mj_value value); #ifdef __cplusplus -} // extern "C" -#endif // __cplusplus +} // extern "C" +#endif // __cplusplus -#endif /* _minijinja_h_included */ +#endif /* _minijinja_h_included */ diff --git a/minijinja-cabi/src/error.rs b/minijinja-cabi/src/error.rs index 4787d06c..996adf76 100644 --- a/minijinja-cabi/src/error.rs +++ b/minijinja-cabi/src/error.rs @@ -96,7 +96,7 @@ pub enum mj_err_kind { MJ_ERR_KIND_UNKNOWN_METHOD, MJ_ERR_KIND_BAD_ESCAPE, MJ_ERR_KIND_UNDEFINED_ERROR, - KJ_ERROR_KIND_BAD_SERIALIZTION, + MJ_ERROR_KIND_BAD_SERIALIZTION, MJ_ERR_KIND_BAD_INCLUDE, MJ_ERR_KIND_EVAL_BLOCK, MJ_ERR_KIND_CANNOT_UNPACK, @@ -122,7 +122,7 @@ impl TryFrom for mj_err_kind { ErrorKind::UnknownMethod => mj_err_kind::MJ_ERR_KIND_UNKNOWN_METHOD, ErrorKind::BadEscape => mj_err_kind::MJ_ERR_KIND_BAD_ESCAPE, ErrorKind::UndefinedError => mj_err_kind::MJ_ERR_KIND_UNDEFINED_ERROR, - ErrorKind::BadSerialization => mj_err_kind::KJ_ERROR_KIND_BAD_SERIALIZTION, + ErrorKind::BadSerialization => mj_err_kind::MJ_ERROR_KIND_BAD_SERIALIZTION, ErrorKind::BadInclude => mj_err_kind::MJ_ERR_KIND_BAD_INCLUDE, ErrorKind::EvalBlock => mj_err_kind::MJ_ERR_KIND_EVAL_BLOCK, ErrorKind::CannotUnpack => mj_err_kind::MJ_ERR_KIND_CANNOT_UNPACK,