Skip to content

Commit

Permalink
fix minijinja-capi: fix typo in error enum (fixes #591) (#592)
Browse files Browse the repository at this point in the history
changed the bad serializtion error to be
`mj_err_kind::MJ_ERROR_KIND_BAD_SERIALIZTION`
  • Loading branch information
thekorn authored Oct 7, 2024
1 parent 670b67b commit 5872207
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions minijinja-cabi/include/minijinja.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 */
4 changes: 2 additions & 2 deletions minijinja-cabi/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -122,7 +122,7 @@ impl TryFrom<ErrorKind> 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,
Expand Down

0 comments on commit 5872207

Please sign in to comment.