@@ -5,7 +5,7 @@ use ::time::format_description;
55use :: time:: { Date , OffsetDateTime , PrimitiveDateTime , Time } ;
66use leptos:: prelude:: * ;
77
8- #[ derive( Default ) ]
8+ #[ derive( Clone , Default ) ]
99pub struct RenderTimeOptions {
1010 /// Specifies a format string see [the time book](https://time-rs.github.io/book/api/format-description.html).
1111 pub string : Option < String > ,
@@ -26,7 +26,7 @@ pub struct RenderTimeOptions {
2626impl CellValue < Date > for Date {
2727 type RenderOptions = RenderTimeOptions ;
2828
29- fn render_value ( self , options : & Self :: RenderOptions ) -> impl IntoView {
29+ fn render_value ( self , options : Self :: RenderOptions ) -> impl IntoView {
3030 if let Some ( value) = options. string . as_ref ( ) {
3131 let format = format_description:: parse ( value)
3232 . expect ( "Unable to construct a format description given the format string" ) ;
@@ -52,7 +52,7 @@ impl CellValue<Date> for Date {
5252impl CellValue < Time > for Time {
5353 type RenderOptions = RenderTimeOptions ;
5454
55- fn render_value ( self , options : & Self :: RenderOptions ) -> impl IntoView {
55+ fn render_value ( self , options : Self :: RenderOptions ) -> impl IntoView {
5656 if let Some ( value) = options. string . as_ref ( ) {
5757 let format = format_description:: parse ( value)
5858 . expect ( "Unable to construct a format description given the format string" ) ;
@@ -79,7 +79,7 @@ impl CellValue<Time> for Time {
7979impl CellValue < PrimitiveDateTime > for PrimitiveDateTime {
8080 type RenderOptions = RenderTimeOptions ;
8181
82- fn render_value ( self , options : & Self :: RenderOptions ) -> impl IntoView {
82+ fn render_value ( self , options : Self :: RenderOptions ) -> impl IntoView {
8383 if let Some ( value) = options. string . as_ref ( ) {
8484 let format = format_description:: parse ( value)
8585 . expect ( "Unable to construct a format description given the format string" ) ;
@@ -106,7 +106,7 @@ impl CellValue<PrimitiveDateTime> for PrimitiveDateTime {
106106impl CellValue < OffsetDateTime > for OffsetDateTime {
107107 type RenderOptions = RenderTimeOptions ;
108108
109- fn render_value ( self , options : & Self :: RenderOptions ) -> impl IntoView {
109+ fn render_value ( self , options : Self :: RenderOptions ) -> impl IntoView {
110110 if let Some ( value) = options. string . as_ref ( ) {
111111 let format = format_description:: parse ( value)
112112 . expect ( "Unable to construct a format description given the format string" ) ;
0 commit comments