Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] clippy warnings #918

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/netex_france/calendars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ impl<'a> CalendarExporter<'a> {

fn generate_from_date(date: Date) -> Element {
let date_string =
DateTime::<Utc>::from_utc(date.and_hms_opt(0, 0, 0).unwrap(), Utc).to_rfc3339();
DateTime::<Utc>::from_naive_utc_and_offset(date.and_hms_opt(0, 0, 0).unwrap(), Utc)
.to_rfc3339();
Element::builder("FromDate")
.append(Node::Text(date_string))
.build()
Expand Down
7 changes: 5 additions & 2 deletions src/netex_france/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,11 @@ impl Exporter<'_> {

fn create_valid_between(&self) -> Result<Element> {
let format_date = |date: Date, hour, minute, second| -> String {
DateTime::<Utc>::from_utc(date.and_hms_opt(hour, minute, second).unwrap(), Utc)
.to_rfc3339()
DateTime::<Utc>::from_naive_utc_and_offset(
date.and_hms_opt(hour, minute, second).unwrap(),
Utc,
)
.to_rfc3339()
};
let (start_date, end_date) = self.model.calculate_validity_period()?;
let from_date = Element::builder("FromDate")
Expand Down
1 change: 0 additions & 1 deletion src/ntfs/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ where
"comment.txt: comment_id={} not found",
comment_link.comment_id
);
} else {
}
collection
.index_mut(idx)
Expand Down