At the moment, new_from_fd returns an Option<Keymap>. The underlying implementation performs an mmap on the file descriptor to load the keymap.
The mmap could fail of course. Panicking is a fine response to this, but I would prefer being able to get the io::Error resulting from the failed mmap.
At the moment, new_from_fd returns an
Option<Keymap>
. The underlying implementation performs an mmap on the file descriptor to load the keymap.The mmap could fail of course. Panicking is a fine response to this, but I would prefer being able to get the
io::Error
resulting from the failed mmap.