Remove more unneeded Clone
bounds
This commit is contained in:
parent
901af8de3f
commit
c831c5749a
11 changed files with 35 additions and 35 deletions
|
@ -6,13 +6,13 @@ use crate::prelude::*;
|
|||
use crate::{Icon, IconButton, Label, Panel, PanelSide};
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct AssistantPanel<S: 'static + Send + Sync + Clone> {
|
||||
pub struct AssistantPanel<S: 'static + Send + Sync> {
|
||||
id: ElementId,
|
||||
state_type: PhantomData<S>,
|
||||
current_side: PanelSide,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> AssistantPanel<S> {
|
||||
impl<S: 'static + Send + Sync> AssistantPanel<S> {
|
||||
pub fn new(id: impl Into<ElementId>) -> Self {
|
||||
Self {
|
||||
id: id.into(),
|
||||
|
@ -87,11 +87,11 @@ mod stories {
|
|||
use super::*;
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct AssistantPanelStory<S: 'static + Send + Sync + Clone> {
|
||||
pub struct AssistantPanelStory<S: 'static + Send + Sync> {
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> AssistantPanelStory<S> {
|
||||
impl<S: 'static + Send + Sync> AssistantPanelStory<S> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
state_type: PhantomData,
|
||||
|
|
|
@ -10,13 +10,13 @@ use crate::{h_stack, HighlightedText};
|
|||
pub struct Symbol(pub Vec<HighlightedText>);
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct Breadcrumb<S: 'static + Send + Sync + Clone> {
|
||||
pub struct Breadcrumb<S: 'static + Send + Sync> {
|
||||
state_type: PhantomData<S>,
|
||||
path: PathBuf,
|
||||
symbols: Vec<Symbol>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> Breadcrumb<S> {
|
||||
impl<S: 'static + Send + Sync> Breadcrumb<S> {
|
||||
pub fn new(path: PathBuf, symbols: Vec<Symbol>) -> Self {
|
||||
Self {
|
||||
state_type: PhantomData,
|
||||
|
@ -91,11 +91,11 @@ mod stories {
|
|||
use super::*;
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct BreadcrumbStory<S: 'static + Send + Sync + Clone> {
|
||||
pub struct BreadcrumbStory<S: 'static + Send + Sync> {
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> BreadcrumbStory<S> {
|
||||
impl<S: 'static + Send + Sync> BreadcrumbStory<S> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
state_type: PhantomData,
|
||||
|
|
|
@ -118,11 +118,11 @@ mod stories {
|
|||
use super::*;
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct ChatPanelStory<S: 'static + Send + Sync + Clone> {
|
||||
pub struct ChatPanelStory<S: 'static + Send + Sync> {
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> ChatPanelStory<S> {
|
||||
impl<S: 'static + Send + Sync> ChatPanelStory<S> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
state_type: PhantomData,
|
||||
|
|
|
@ -7,12 +7,12 @@ use gpui3::{img, svg, SharedString};
|
|||
use std::marker::PhantomData;
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct CollabPanel<S: 'static + Send + Sync + Clone> {
|
||||
pub struct CollabPanel<S: 'static + Send + Sync> {
|
||||
id: ElementId,
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> CollabPanel<S> {
|
||||
impl<S: 'static + Send + Sync> CollabPanel<S> {
|
||||
pub fn new(id: impl Into<ElementId>) -> Self {
|
||||
Self {
|
||||
id: id.into(),
|
||||
|
@ -165,11 +165,11 @@ mod stories {
|
|||
use super::*;
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct CollabPanelStory<S: 'static + Send + Sync + Clone> {
|
||||
pub struct CollabPanelStory<S: 'static + Send + Sync> {
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> CollabPanelStory<S> {
|
||||
impl<S: 'static + Send + Sync> CollabPanelStory<S> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
state_type: PhantomData,
|
||||
|
|
|
@ -4,12 +4,12 @@ use crate::prelude::*;
|
|||
use crate::{example_editor_actions, OrderMethod, Palette};
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct CommandPalette<S: 'static + Send + Sync + Clone> {
|
||||
pub struct CommandPalette<S: 'static + Send + Sync> {
|
||||
id: ElementId,
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> CommandPalette<S> {
|
||||
impl<S: 'static + Send + Sync> CommandPalette<S> {
|
||||
pub fn new(id: impl Into<ElementId>) -> Self {
|
||||
Self {
|
||||
id: id.into(),
|
||||
|
@ -38,11 +38,11 @@ mod stories {
|
|||
use super::*;
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct CommandPaletteStory<S: 'static + Send + Sync + Clone> {
|
||||
pub struct CommandPaletteStory<S: 'static + Send + Sync> {
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> CommandPaletteStory<S> {
|
||||
impl<S: 'static + Send + Sync> CommandPaletteStory<S> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
state_type: PhantomData,
|
||||
|
|
|
@ -74,11 +74,11 @@ mod stories {
|
|||
use super::*;
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct ContextMenuStory<S: 'static + Send + Sync + Clone> {
|
||||
pub struct ContextMenuStory<S: 'static + Send + Sync> {
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> ContextMenuStory<S> {
|
||||
impl<S: 'static + Send + Sync> ContextMenuStory<S> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
state_type: PhantomData,
|
||||
|
|
|
@ -4,12 +4,12 @@ use crate::{prelude::*, static_new_notification_items, static_read_notification_
|
|||
use crate::{List, ListHeader};
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct NotificationsPanel<S: 'static + Send + Sync + Clone> {
|
||||
pub struct NotificationsPanel<S: 'static + Send + Sync> {
|
||||
id: ElementId,
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> NotificationsPanel<S> {
|
||||
impl<S: 'static + Send + Sync> NotificationsPanel<S> {
|
||||
pub fn new(id: impl Into<ElementId>) -> Self {
|
||||
Self {
|
||||
id: id.into(),
|
||||
|
|
|
@ -6,12 +6,12 @@ use crate::{
|
|||
};
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct ProjectPanel<S: 'static + Send + Sync + Clone> {
|
||||
pub struct ProjectPanel<S: 'static + Send + Sync> {
|
||||
id: ElementId,
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> ProjectPanel<S> {
|
||||
impl<S: 'static + Send + Sync> ProjectPanel<S> {
|
||||
pub fn new(id: impl Into<ElementId>) -> Self {
|
||||
Self {
|
||||
id: id.into(),
|
||||
|
|
|
@ -4,12 +4,12 @@ use crate::prelude::*;
|
|||
use crate::{OrderMethod, Palette, PaletteItem};
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct ThemeSelector<S: 'static + Send + Sync + Clone> {
|
||||
pub struct ThemeSelector<S: 'static + Send + Sync> {
|
||||
id: ElementId,
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> ThemeSelector<S> {
|
||||
impl<S: 'static + Send + Sync> ThemeSelector<S> {
|
||||
pub fn new(id: impl Into<ElementId>) -> Self {
|
||||
Self {
|
||||
id: id.into(),
|
||||
|
|
|
@ -79,11 +79,11 @@ mod stories {
|
|||
use super::*;
|
||||
|
||||
#[derive(Element)]
|
||||
pub struct ToastStory<S: 'static + Send + Sync + Clone> {
|
||||
pub struct ToastStory<S: 'static + Send + Sync> {
|
||||
state_type: PhantomData<S>,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync + Clone> ToastStory<S> {
|
||||
impl<S: 'static + Send + Sync> ToastStory<S> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
state_type: PhantomData,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue