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.
This commit is contained in:
Justin M. Keyes
2023-12-07 13:01:42 +01:00
parent cca6c4c698
commit a16218d4c6
7 changed files with 15 additions and 46 deletions

View File

@@ -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)) {