Remove warnigns

This commit is contained in:
Conrad Irwin 2023-12-11 10:43:09 -07:00
parent af7c93b8d5
commit dd42adc4e5
14 changed files with 22 additions and 35 deletions

View file

@ -1,7 +1,7 @@
use std::ops::Range;
use editor::{scroll::autoscroll::Autoscroll, MultiBufferSnapshot, ToOffset, ToPoint};
use gpui::{impl_actions, AppContext, ViewContext, WindowContext};
use gpui::{impl_actions, ViewContext, WindowContext};
use language::{Bias, Point};
use serde::Deserialize;
use workspace::Workspace;
@ -24,7 +24,7 @@ struct Decrement {
impl_actions!(vim, [Increment, Decrement]);
pub fn register(workspace: &mut Workspace, cx: &mut ViewContext<Workspace>) {
pub fn register(workspace: &mut Workspace, _: &mut ViewContext<Workspace>) {
workspace.register_action(|_: &mut Workspace, action: &Increment, cx| {
Vim::update(cx, |vim, cx| {
vim.record_current_action(cx);

View file

@ -5,7 +5,7 @@ use crate::{
visual::visual_motion,
Vim,
};
use gpui::{actions, Action, AppContext, ViewContext, WindowContext};
use gpui::{actions, Action, ViewContext, WindowContext};
use workspace::Workspace;
actions!(vim, [Repeat, EndRepeat]);

View file

@ -4,7 +4,7 @@ use editor::{
scroll::{scroll_amount::ScrollAmount, VERTICAL_SCROLL_MARGIN},
DisplayPoint, Editor,
};
use gpui::{actions, AppContext, ViewContext};
use gpui::{actions, ViewContext};
use language::Bias;
use workspace::Workspace;
@ -13,7 +13,7 @@ actions!(
[LineUp, LineDown, ScrollUp, ScrollDown, PageUp, PageDown]
);
pub fn register(workspace: &mut Workspace, cx: &mut ViewContext<Workspace>) {
pub fn register(workspace: &mut Workspace, _: &mut ViewContext<Workspace>) {
workspace.register_action(|_: &mut Workspace, _: &LineDown, cx| {
scroll(cx, false, |c| ScrollAmount::Line(c.unwrap_or(1.)))
});

View file

@ -1,7 +1,7 @@
use gpui::{actions, impl_actions, Action, AppContext, ViewContext};
use gpui::{actions, impl_actions, ViewContext};
use search::{buffer_search, BufferSearchBar, SearchMode, SearchOptions};
use serde_derive::Deserialize;
use workspace::{searchable::Direction, Pane, Workspace};
use workspace::{searchable::Direction, Workspace};
use crate::{motion::Motion, normal::move_cursor, state::SearchState, Vim};
@ -50,7 +50,7 @@ impl_actions!(
[FindCommand, ReplaceCommand, Search, MoveToPrev, MoveToNext]
);
pub(crate) fn register(workspace: &mut Workspace, cx: &mut ViewContext<Workspace>) {
pub(crate) fn register(workspace: &mut Workspace, _: &mut ViewContext<Workspace>) {
workspace.register_action(move_to_next);
workspace.register_action(move_to_prev);
workspace.register_action(search);