mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
refactor(fileio): remove useless use of FileDescriptor
FileDescriptor is used to buffer togheter many small writes to fewer syscalls. if the data to write already is in a single buffer, it is perfectly fine to just use os_write directly (which will take care of the reverse problem: splitting a too big write into many syscalls)
This commit is contained in:
@@ -365,14 +365,3 @@ ptrdiff_t file_skip(FileDescriptor *const fp, const size_t size)
|
||||
|
||||
return (ptrdiff_t)read_bytes;
|
||||
}
|
||||
|
||||
/// Print error which occurs when failing to write msgpack data
|
||||
///
|
||||
/// @param[in] error Error code of the error to print.
|
||||
///
|
||||
/// @return -1 (error return for msgpack_packer callbacks).
|
||||
int msgpack_file_write_error(const int error)
|
||||
{
|
||||
semsg(_("E5420: Failed to write to file: %s"), os_strerror(error));
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user