Detailed changes
@@ -10,9 +10,7 @@ use client::{
use collections::{BTreeMap, HashMap, HashSet};
use fs::Fs;
use futures::{FutureExt, StreamExt};
-use gpui::{
- AsyncAppContext, Entity, ModelContext, ModelHandle, AppContext, Task, WeakModelHandle,
-};
+use gpui::{AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle, Task, WeakModelHandle};
use language::LanguageRegistry;
use live_kit_client::{LocalTrackPublication, LocalVideoTrack, RemoteVideoTrackUpdate};
use postage::stream::Stream;
@@ -70,10 +68,7 @@ impl Entity for Room {
}
}
- fn app_will_quit(
- &mut self,
- cx: &mut AppContext,
- ) -> Option<Pin<Box<dyn Future<Output = ()>>>> {
+ fn app_will_quit(&mut self, cx: &mut AppContext) -> Option<Pin<Box<dyn Future<Output = ()>>>> {
if self.status.is_online() {
let leave = self.leave_internal(cx);
Some(
@@ -3,8 +3,8 @@ use std::sync::Arc;
use crate::notifications::render_user_notification;
use client::{ContactEventKind, User, UserStore};
use gpui::{
- elements::*, impl_internal_actions, Entity, ModelHandle, AppContext, RenderContext,
- View, ViewContext,
+ elements::*, impl_internal_actions, AppContext, Entity, ModelHandle, RenderContext, View,
+ ViewContext,
};
use workspace::notifications::Notification;
@@ -4,8 +4,8 @@ use futures::StreamExt;
use gpui::{
elements::*,
geometry::{rect::RectF, vector::vec2f},
- impl_internal_actions, CursorStyle, Entity, MouseButton, AppContext, RenderContext,
- View, ViewContext, WindowBounds, WindowKind, WindowOptions,
+ impl_internal_actions, AppContext, CursorStyle, Entity, MouseButton, RenderContext, View,
+ ViewContext, WindowBounds, WindowKind, WindowOptions,
};
use settings::Settings;
use util::ResultExt;
@@ -5,8 +5,8 @@ use gpui::{
actions,
elements::*,
geometry::{rect::RectF, vector::vec2f},
- CursorStyle, Entity, MouseButton, AppContext, RenderContext, View, ViewContext,
- WindowBounds, WindowKind, WindowOptions,
+ AppContext, CursorStyle, Entity, MouseButton, RenderContext, View, ViewContext, WindowBounds,
+ WindowKind, WindowOptions,
};
use settings::Settings;
use std::sync::Arc;
@@ -2,7 +2,7 @@ use call::ActiveCall;
use gpui::{
color::Color,
elements::{MouseEventHandler, Svg},
- Appearance, Element, ElementBox, Entity, MouseButton, AppContext, RenderContext, View,
+ AppContext, Appearance, Element, ElementBox, Entity, MouseButton, RenderContext, View,
};
use settings::Settings;
@@ -4,7 +4,7 @@ use gpui::{
actions,
elements::{ChildView, Flex, Label, ParentElement},
keymap_matcher::Keystroke,
- Action, AnyViewHandle, Element, Entity, MouseState, AppContext, RenderContext, View,
+ Action, AnyViewHandle, AppContext, Element, Entity, MouseState, RenderContext, View,
ViewContext, ViewHandle,
};
use picker::{Picker, PickerDelegate};
@@ -1,6 +1,6 @@
use crate::{request::PromptUserDeviceFlow, Copilot, Status};
use gpui::{
- elements::*, geometry::rect::RectF, ClipboardItem, Element, Entity, AppContext, View,
+ elements::*, geometry::rect::RectF, AppContext, ClipboardItem, Element, Entity, View,
ViewContext, ViewHandle, WindowKind, WindowOptions,
};
use settings::Settings;
@@ -1,8 +1,8 @@
use collections::HashSet;
use editor::{Editor, GoToDiagnostic};
use gpui::{
- elements::*, platform::CursorStyle, serde_json, Entity, ModelHandle, MouseButton,
- AppContext, RenderContext, Subscription, View, ViewContext, ViewHandle, WeakViewHandle,
+ elements::*, platform::CursorStyle, serde_json, AppContext, Entity, ModelHandle, MouseButton,
+ RenderContext, Subscription, View, ViewContext, ViewHandle, WeakViewHandle,
};
use language::Diagnostic;
use project::Project;
@@ -640,9 +640,7 @@ mod tests {
}
#[gpui::test]
- fn test_long_lines_with_character_spanning_max_expansion_column(
- cx: &mut gpui::AppContext,
- ) {
+ fn test_long_lines_with_character_spanning_max_expansion_column(cx: &mut gpui::AppContext) {
let max_expansion_column = 8;
let input = "abcdefgβ―hij";
@@ -9,7 +9,7 @@ use std::{
use gpui::{
geometry::vector::{vec2f, Vector2F},
- Axis, AppContext, Task, ViewContext,
+ AppContext, Axis, Task, ViewContext,
};
use language::{Bias, Point};
use util::ResultExt;
@@ -1,6 +1,5 @@
use gpui::{
- actions, geometry::vector::Vector2F, impl_internal_actions, Axis, AppContext,
- ViewContext,
+ actions, geometry::vector::Vector2F, impl_internal_actions, AppContext, Axis, ViewContext,
};
use language::Bias;
@@ -6,7 +6,7 @@ pub mod submit_feedback_button;
use std::sync::Arc;
mod system_specs;
-use gpui::{actions, impl_actions, ClipboardItem, AppContext, PromptLevel, ViewContext};
+use gpui::{actions, impl_actions, AppContext, ClipboardItem, PromptLevel, ViewContext};
use serde::Deserialize;
use system_specs::SystemSpecs;
use workspace::{AppState, Workspace};
@@ -4,8 +4,8 @@ use fuzzy::{StringMatch, StringMatchCandidate};
use gpui::{
actions,
elements::{ChildView, Flex, ParentElement},
- AnyViewHandle, Element, ElementBox, Entity, AppContext, RenderContext, Task, View,
- ViewContext, ViewHandle,
+ AnyViewHandle, AppContext, Element, ElementBox, Entity, RenderContext, Task, View, ViewContext,
+ ViewHandle,
};
use highlighted_workspace_location::HighlightedWorkspaceLocation;
use ordered_float::OrderedFloat;
@@ -13,10 +13,7 @@ impl std::ops::Deref for StaffMode {
/// Despite what the type system requires me to tell you, the init function will only be called a once
/// as soon as we know that the staff mode is enabled.
-pub fn staff_mode<F: FnMut(&mut AppContext) + 'static>(
- cx: &mut AppContext,
- mut init: F,
-) {
+pub fn staff_mode<F: FnMut(&mut AppContext) + 'static>(cx: &mut AppContext, mut init: F) {
if **cx.default_global::<StaffMode>() {
init(cx)
} else {
@@ -32,10 +29,7 @@ pub fn staff_mode<F: FnMut(&mut AppContext) + 'static>(
/// Immediately checks and runs the init function if the staff mode is not enabled.
/// This is only included for symettry with staff_mode() above
-pub fn not_staff_mode<F: FnOnce(&mut AppContext) + 'static>(
- cx: &mut AppContext,
- init: F,
-) {
+pub fn not_staff_mode<F: FnOnce(&mut AppContext) + 'static>(cx: &mut AppContext, init: F) {
if !**cx.default_global::<StaffMode>() {
init(cx)
}
@@ -1,8 +1,7 @@
use context_menu::{ContextMenu, ContextMenuItem};
use gpui::{
- elements::*, impl_internal_actions, CursorStyle, Element, ElementBox, Entity, MouseButton,
- AppContext, RenderContext, View, ViewContext, ViewHandle, WeakModelHandle,
- WeakViewHandle,
+ elements::*, impl_internal_actions, AppContext, CursorStyle, Element, ElementBox, Entity,
+ MouseButton, RenderContext, View, ViewContext, ViewHandle, WeakModelHandle, WeakViewHandle,
};
use settings::Settings;
use std::any::TypeId;
@@ -2,7 +2,7 @@ use fuzzy::{match_strings, StringMatch, StringMatchCandidate};
use gpui::{
actions,
elements::{ChildView, Element as _, Label},
- AnyViewHandle, Entity, AppContext, View, ViewContext, ViewHandle,
+ AnyViewHandle, AppContext, Entity, View, ViewContext, ViewHandle,
};
use picker::{Picker, PickerDelegate};
use settings::{settings_file::SettingsFile, BaseKeymap, Settings};
@@ -5,7 +5,7 @@ use std::sync::Arc;
use db::kvp::KEY_VALUE_STORE;
use gpui::{
elements::{Flex, Label, ParentElement},
- Element, ElementBox, Entity, AppContext, Subscription, View, ViewContext,
+ AppContext, Element, ElementBox, Entity, Subscription, View, ViewContext,
};
use settings::{settings_file::SettingsFile, Settings};
@@ -1,7 +1,7 @@
use std::{any::TypeId, ops::DerefMut};
use collections::HashSet;
-use gpui::{AnyViewHandle, Entity, AppContext, View, ViewContext, ViewHandle};
+use gpui::{AnyViewHandle, AppContext, Entity, View, ViewContext, ViewHandle};
use crate::Workspace;
@@ -138,7 +138,7 @@ pub mod simple_message_notification {
use gpui::{
actions,
elements::{Flex, MouseEventHandler, Padding, ParentElement, Svg, Text},
- impl_actions, Action, CursorStyle, Element, Entity, MouseButton, AppContext, View,
+ impl_actions, Action, AppContext, CursorStyle, Element, Entity, MouseButton, View,
ViewContext,
};
use menu::Cancel;
@@ -99,10 +99,7 @@ impl LspAdapter for YamlLspAdapter {
.log_err()
}
- fn workspace_configuration(
- &self,
- cx: &mut AppContext,
- ) -> Option<BoxFuture<'static, Value>> {
+ fn workspace_configuration(&self, cx: &mut AppContext) -> Option<BoxFuture<'static, Value>> {
let settings = cx.global::<Settings>();
Some(
future::ready(serde_json::json!({