aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/helpers.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/api/private/helpers.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/api/private/helpers.c')
-rw-r--r--src/nvim/api/private/helpers.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index b23684aee9..2772fa8b59 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -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;