File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -230,14 +230,6 @@ pub mod filters {
230
230
Ok ( ( ( multiplier * * value) . round ( ) / multiplier) . to_string ( ) )
231
231
}
232
232
233
- pub fn opt_date ( value : & Option < DateTime < Utc > > , format : & str ) -> rinja:: Result < String > {
234
- if let Some ( value) = value {
235
- Ok ( value. format ( format) . to_string ( ) )
236
- } else {
237
- Ok ( String :: new ( ) )
238
- }
239
- }
240
-
241
233
pub fn split_first < ' a > ( value : & ' a str , pat : & str ) -> rinja:: Result < Option < & ' a str > > {
242
234
Ok ( value. split ( pat) . next ( ) )
243
235
}
Original file line number Diff line number Diff line change 11
11
<id >urn:docs-rs:{{ crate::BUILD_VERSION }}</id >
12
12
<updated >
13
13
{%- if let Some(first_release) = recent_releases.get(0) -%}
14
- {{ first_release.build_time|opt_date("%+") }}
14
+ {%- if let Some(build_time) = first_release.build_time -%}
15
+ {{ build_time.format("%+") }}
16
+ {%- endif -%}
15
17
{%- endif -%}
16
18
</updated >
17
19
28
30
29
31
<link href =" {{ link|safe }}" />
30
32
<id >urn:docs-rs:{{ release.name }}:{{ release.version }}</id >
31
- <updated >{{ release.build_time|opt_date("%+") }}</updated >
33
+ <updated >
34
+ {% if let Some(build_time) = release.build_time -%}
35
+ {{ build_time.format("%+") }}
36
+ {%- endif -%}
37
+ </updated >
32
38
33
39
<summary >
34
40
{%- if let Some(description) = release.description -%}
You can’t perform that action at this time.
0 commit comments