formatting and clippy fixes

macos-click-through
Keith Simmons 3 years ago
parent bc8d002e32
commit 29668bb743

@ -4,7 +4,7 @@ use std::sync::Arc;
use log::error;
use log::trace;
use nvim_rs::{Neovim, call_args, rpc::model::IntoVal};
use nvim_rs::{call_args, rpc::model::IntoVal, Neovim};
use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver};
use crate::bridge::TxWrapper;
@ -173,13 +173,10 @@ impl ParallelCommand {
nvim.command("file scratch").await.ok();
nvim.call(
"nvim_buf_set_lines",
call_args![
0i64,
0i64,
-1i64,
false,
content
]).await.ok();
call_args![0i64, 0i64, -1i64, false, content],
)
.await
.ok();
}
#[cfg(windows)]
ParallelCommand::RegisterRightClick => {

@ -422,7 +422,7 @@ impl Editor {
fn set_option(&mut self, gui_option: GuiOption) {
trace!("Option set {:?}", &gui_option);
if let GuiOption::GuiFont(guifont) = gui_option {
if guifont == "*".to_owned() {
if guifont == *"*" {
self.window_command_sender
.send(WindowCommand::ListAvailableFonts)
.ok();

@ -88,7 +88,7 @@ impl GlutinWindowWrapper {
WindowCommand::TitleChanged(new_title) => self.handle_title_changed(new_title),
WindowCommand::SetMouseEnabled(mouse_enabled) => {
self.mouse_manager.enabled = mouse_enabled
},
}
WindowCommand::ListAvailableFonts => self.send_font_names(),
}
}
@ -101,7 +101,11 @@ impl GlutinWindowWrapper {
pub fn send_font_names(&self) {
let font_names = self.renderer.font_names();
self.ui_command_sender.send(UiCommand::Parallel(ParallelCommand::DisplayAvailableFonts(font_names))).unwrap();
self.ui_command_sender
.send(UiCommand::Parallel(ParallelCommand::DisplayAvailableFonts(
font_names,
)))
.unwrap();
}
pub fn handle_quit(&mut self) {

Loading…
Cancel
Save