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

@@ -253,9 +253,7 @@ Object dict_set_var(dict_T *dict, String key, Object value, bool del, bool retva
typval_T tv;
// Convert the object to a vimscript type in the temporary variable
if (!object_to_vim(value, &tv, err)) {
return rv;
}
object_to_vim(value, &tv, err);
typval_T oldtv = TV_INITIAL_VALUE;