Fix unnecessary move warning

This commit is contained in:
Mahmoud Al-Qudsi 2024-03-14 17:05:58 -05:00
parent e2df29447f
commit 72d372cca1

View File

@ -262,7 +262,7 @@ static int abbr_add(const abbr_options_t &opts, io_streams_t &streams) {
abbrs_position_t position = opts.position ? *opts.position : abbrs_position_t::command;
// Note historically we have allowed overwriting existing abbreviations.
abbreviation_t abbr{std::move(name), std::move(key), std::move(replacement), position};
abbreviation_t abbr{name, std::move(key), std::move(replacement), position};
abbr.regex = std::move(regex);
abbr.replacement_is_function = opts.function.has_value();
abbr.set_cursor_marker = opts.set_cursor_marker;