aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/context.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-12-07 13:01:42 +0100
committerJustin M. Keyes <justinkz@gmail.com>2023-12-07 13:09:31 +0100
commita16218d4c6773c474011149661470af6e8c90892 (patch)
tree4d18136e38aaa7e0afed05e8e7a6b3a754e39089 /src/nvim/context.c
parentcca6c4c6986abc67cd213ad1d32d329384a57790 (diff)
downloadrneovim-a16218d4c6773c474011149661470af6e8c90892.tar.gz
rneovim-a16218d4c6773c474011149661470af6e8c90892.tar.bz2
rneovim-a16218d4c6773c474011149661470af6e8c90892.zip
refactor: object_to_vim() cannot fail
Since the parent commit, object_to_vim() can't fail, so callers don't need to check its result.
Diffstat (limited to 'src/nvim/context.c')
-rw-r--r--src/nvim/context.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/context.c b/src/nvim/context.c
index 5f47cfc225..28a67061c6 100644
--- a/src/nvim/context.c
+++ b/src/nvim/context.c
@@ -326,9 +326,7 @@ static inline msgpack_sbuffer array_to_sbuf(Array array, Error *err)
msgpack_sbuffer_init(&sbuf);
typval_T list_tv;
- if (!object_to_vim(ARRAY_OBJ(array), &list_tv, err)) {
- return sbuf;
- }
+ object_to_vim(ARRAY_OBJ(array), &list_tv, err);
assert(list_tv.v_type == VAR_LIST);
if (!encode_vim_list_to_buf(list_tv.vval.v_list, &sbuf.size, &sbuf.data)) {