Skip to content

Commit 85d3cd7

Browse files
committed
Small code cleanup
1 parent 4ec5b00 commit 85d3cd7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub mod session;
2525
pub mod neovim;
2626
pub mod neovim_api;
2727

28-
pub use neovim::Neovim;
28+
pub use neovim::{Neovim, UiAttachOptions, CallError};
2929
pub use neovim_api::NeovimApi;
3030
pub use session::Session;
3131

src/neovim.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ pub struct Neovim {
99
pub session: Session,
1010
}
1111

12-
pub struct Options {
12+
pub struct UiAttachOptions {
1313
rgb: bool,
1414
popupmenu_external: bool,
1515
}
1616

17-
impl Options {
18-
pub fn new() -> Options {
19-
Options {
17+
impl UiAttachOptions {
18+
pub fn new() -> UiAttachOptions {
19+
UiAttachOptions {
2020
rgb: true,
2121
popupmenu_external: false,
2222
}
@@ -93,9 +93,9 @@ impl Neovim {
9393
/// Register as a remote UI.
9494
///
9595
/// After this method is called, the client will receive redraw notifications.
96-
pub fn ui_attach(&mut self, width: u64, height: u64, opts: &Options) -> Result<(), CallError> {
96+
pub fn ui_attach(&mut self, width: u64, height: u64, opts: UiAttachOptions) -> Result<(), CallError> {
9797
self.session
98-
.call("ui_attach", &call_args!(width, height, opts.to_value_map()))
98+
.call("nvim_ui_attach", &call_args!(width, height, opts.to_value_map()))
9999
.map_err(map_generic_error)
100100
.map(|_| ())
101101
}

0 commit comments

Comments
 (0)