Remove unneeded constructors for stories

This commit is contained in:
Marshall Bowers
2023-10-26 16:46:49 +02:00
parent 65045b9c52
commit 61694bba6a
33 changed files with 62 additions and 227 deletions
-4
View File
@@ -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))
-4
View File
@@ -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();
-4
View File
@@ -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))
-4
View File
@@ -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();
-4
View File
@@ -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))
-4
View File
@@ -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))