Skip to content

Commit

Permalink
Small code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
daa84 committed Mar 11, 2017
1 parent 4ec5b00 commit 85d3cd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub mod session;
pub mod neovim;
pub mod neovim_api;

pub use neovim::Neovim;
pub use neovim::{Neovim, UiAttachOptions, CallError};
pub use neovim_api::NeovimApi;
pub use session::Session;

Expand Down
12 changes: 6 additions & 6 deletions src/neovim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ pub struct Neovim {
pub session: Session,
}

pub struct Options {
pub struct UiAttachOptions {
rgb: bool,
popupmenu_external: bool,
}

impl Options {
pub fn new() -> Options {
Options {
impl UiAttachOptions {
pub fn new() -> UiAttachOptions {
UiAttachOptions {
rgb: true,
popupmenu_external: false,
}
Expand Down Expand Up @@ -93,9 +93,9 @@ impl Neovim {
/// Register as a remote UI.
///
/// After this method is called, the client will receive redraw notifications.
pub fn ui_attach(&mut self, width: u64, height: u64, opts: &Options) -> Result<(), CallError> {
pub fn ui_attach(&mut self, width: u64, height: u64, opts: UiAttachOptions) -> Result<(), CallError> {
self.session
.call("ui_attach", &call_args!(width, height, opts.to_value_map()))
.call("nvim_ui_attach", &call_args!(width, height, opts.to_value_map()))
.map_err(map_generic_error)
.map(|_| ())
}
Expand Down

0 comments on commit 85d3cd7

Please sign in to comment.