Another batch of lint fixes (#36521)
- **Enable a bunch of extra lints** - **First batch of fixes** - **More fixes** Release Notes: - N/A
This commit is contained in:
parent
69b1c6d6f5
commit
6825715503
147 changed files with 788 additions and 1042 deletions
|
@ -621,8 +621,7 @@ impl KeymapEditor {
|
|||
let key_bindings_ptr = cx.key_bindings();
|
||||
let lock = key_bindings_ptr.borrow();
|
||||
let key_bindings = lock.bindings();
|
||||
let mut unmapped_action_names =
|
||||
HashSet::from_iter(cx.all_action_names().into_iter().copied());
|
||||
let mut unmapped_action_names = HashSet::from_iter(cx.all_action_names().iter().copied());
|
||||
let action_documentation = cx.action_documentation();
|
||||
let mut generator = KeymapFile::action_schema_generator();
|
||||
let actions_with_schemas = HashSet::from_iter(
|
||||
|
@ -1289,7 +1288,7 @@ struct HumanizedActionNameCache {
|
|||
|
||||
impl HumanizedActionNameCache {
|
||||
fn new(cx: &App) -> Self {
|
||||
let cache = HashMap::from_iter(cx.all_action_names().into_iter().map(|&action_name| {
|
||||
let cache = HashMap::from_iter(cx.all_action_names().iter().map(|&action_name| {
|
||||
(
|
||||
action_name,
|
||||
command_palette::humanize_action_name(action_name).into(),
|
||||
|
@ -1857,18 +1856,15 @@ impl Render for KeymapEditor {
|
|||
mouse_down_event: &gpui::MouseDownEvent,
|
||||
window,
|
||||
cx| {
|
||||
match mouse_down_event.button {
|
||||
MouseButton::Right => {
|
||||
this.select_index(
|
||||
row_index, None, window, cx,
|
||||
);
|
||||
this.create_context_menu(
|
||||
mouse_down_event.position,
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
}
|
||||
_ => {}
|
||||
if mouse_down_event.button == MouseButton::Right {
|
||||
this.select_index(
|
||||
row_index, None, window, cx,
|
||||
);
|
||||
this.create_context_menu(
|
||||
mouse_down_event.position,
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
}
|
||||
},
|
||||
))
|
||||
|
|
|
@ -19,7 +19,7 @@ actions!(
|
|||
]
|
||||
);
|
||||
|
||||
const KEY_CONTEXT_VALUE: &'static str = "KeystrokeInput";
|
||||
const KEY_CONTEXT_VALUE: &str = "KeystrokeInput";
|
||||
|
||||
const CLOSE_KEYSTROKE_CAPTURE_END_TIMEOUT: std::time::Duration =
|
||||
std::time::Duration::from_millis(300);
|
||||
|
|
|
@ -213,7 +213,7 @@ impl TableInteractionState {
|
|||
|
||||
let mut column_ix = 0;
|
||||
let resizable_columns_slice = *resizable_columns;
|
||||
let mut resizable_columns = resizable_columns.into_iter();
|
||||
let mut resizable_columns = resizable_columns.iter();
|
||||
|
||||
let dividers = intersperse_with(spacers, || {
|
||||
window.with_id(column_ix, |window| {
|
||||
|
@ -801,7 +801,7 @@ impl<const COLS: usize> Table<COLS> {
|
|||
) -> Self {
|
||||
self.rows = TableContents::UniformList(UniformListData {
|
||||
element_id: id.into(),
|
||||
row_count: row_count,
|
||||
row_count,
|
||||
render_item_fn: Box::new(render_item_fn),
|
||||
});
|
||||
self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue