Remove usage of use gpui::* (#22310)

This PR removes usages of `use gpui::*;` in the codebase (excluding
examples).

We should only use glob imports for `gpui::prelude`, and then import
everything else individually.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2024-12-20 22:52:11 +00:00
committed by GitHub
parent fadf9ff4f4
commit 7c6feeb3a8
3 changed files with 18 additions and 14 deletions
+13 -10
View File
@@ -1,4 +1,16 @@
use anyhow::Result;
use collections::HashMap;
use db::kvp::KEY_VALUE_STORE;
use git::repository::GitFileStatus;
use gpui::{
actions, prelude::*, uniform_list, Action, AppContext, AsyncWindowContext, ClickEvent,
CursorStyle, EventEmitter, FocusHandle, FocusableView, KeyContext,
ListHorizontalSizingBehavior, ListSizingBehavior, Model, Modifiers, ModifiersChangedEvent,
MouseButton, Stateful, Task, UniformListScrollHandle, View, WeakView,
};
use project::{Entry, EntryKind, Fs, Project, ProjectEntryId, WorktreeId};
use serde::{Deserialize, Serialize};
use settings::Settings as _;
use std::{
cell::OnceCell,
collections::HashSet,
@@ -8,19 +20,10 @@ use std::{
sync::Arc,
time::Duration,
};
use git::repository::GitFileStatus;
use util::{ResultExt, TryFutureExt};
use db::kvp::KEY_VALUE_STORE;
use gpui::*;
use project::{Entry, EntryKind, Fs, Project, ProjectEntryId, WorktreeId};
use serde::{Deserialize, Serialize};
use settings::Settings as _;
use ui::{
prelude::*, Checkbox, Divider, DividerColor, ElevationIndex, Scrollbar, ScrollbarState, Tooltip,
};
use util::{ResultExt, TryFutureExt};
use workspace::dock::{DockPosition, Panel, PanelEvent};
use workspace::Workspace;
+2 -1
View File
@@ -1,7 +1,8 @@
#![allow(missing_docs)]
use gpui::Axis;
use crate::prelude::*;
use gpui::*;
#[derive(IntoElement)]
pub struct ToolStrip {
+3 -3
View File
@@ -5,11 +5,11 @@
//! It can't be located in the `ui` crate because it depends on `editor`.
//!
use editor::*;
use gpui::*;
use editor::{Editor, EditorElement, EditorStyle};
use gpui::{AppContext, FocusHandle, FocusableView, FontStyle, Hsla, TextStyle, View};
use settings::Settings;
use theme::ThemeSettings;
use ui::*;
use ui::prelude::*;
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum FieldLabelLayout {