Remove unneeded constructors for stories
This commit is contained in:
@@ -51,10 +51,6 @@ mod stories {
|
||||
pub struct AvatarStory;
|
||||
|
||||
impl AvatarStory {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, Avatar>(cx))
|
||||
|
||||
@@ -230,10 +230,6 @@ mod stories {
|
||||
pub struct ButtonStory;
|
||||
|
||||
impl ButtonStory {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
|
||||
let states = InteractionState::iter();
|
||||
|
||||
|
||||
@@ -54,10 +54,6 @@ mod stories {
|
||||
pub struct DetailsStory;
|
||||
|
||||
impl DetailsStory {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, Details<V>>(cx))
|
||||
|
||||
@@ -202,10 +202,6 @@ mod stories {
|
||||
pub struct IconStory;
|
||||
|
||||
impl IconStory {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
|
||||
let icons = Icon::iter();
|
||||
|
||||
|
||||
@@ -120,10 +120,6 @@ mod stories {
|
||||
pub struct InputStory;
|
||||
|
||||
impl InputStory {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, Input>(cx))
|
||||
|
||||
@@ -209,10 +209,6 @@ mod stories {
|
||||
pub struct LabelStory;
|
||||
|
||||
impl LabelStory {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, Label>(cx))
|
||||
|
||||
Reference in New Issue
Block a user