Skip to content

Commit

Permalink
Merge #431
Browse files Browse the repository at this point in the history
431: Fix clippy warnings r=lnicola a=lnicola

- [x] I agree to follow the project's [code of conduct](https://github.com/georust/gdal/blob/master/CODE_OF_CONDUCT.md).
- [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.
---



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
  • Loading branch information
bors[bot] and lnicola committed Sep 7, 2023
2 parents d93ab7f + 9525c8b commit c7f121c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/vector/feature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ impl<'a> Feature<'a> {
let dv = value
.and_hms_opt(0, 0, 0)
.ok_or_else(|| GdalError::DateError("offset to midnight".into()))?;
let dt = DateTime::from_utc(
let dt = DateTime::from_naive_utc_and_offset(
dv,
FixedOffset::east_opt(0)
.ok_or_else(|| GdalError::DateError("utc offset".into()))?,
Expand Down
8 changes: 4 additions & 4 deletions src/vector/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ mod tests {
.fields()
.map(|f| (f.name(), f.field_type()))
.collect::<Vec<_>>();
let ok_names_types = vec![
let ok_names_types = [
("kind", OGRFieldType::OFTString),
("sort_key", OGRFieldType::OFTReal),
("is_link", OGRFieldType::OFTString),
Expand All @@ -1344,7 +1344,7 @@ mod tests {
("railway", OGRFieldType::OFTString),
("highway", OGRFieldType::OFTString),
]
.iter()
.into_iter()
.map(|s| (s.0.to_string(), s.1))
.collect::<Vec<_>>();
assert_eq!(name_list, ok_names_types);
Expand All @@ -1359,8 +1359,8 @@ mod tests {
.geom_fields()
.map(|f| (f.name(), f.field_type()))
.collect::<Vec<_>>();
let ok_names_types = vec![("", OGRwkbGeometryType::wkbLineString)]
.iter()
let ok_names_types = [("", OGRwkbGeometryType::wkbLineString)]
.into_iter()
.map(|s| (s.0.to_string(), s.1))
.collect::<Vec<_>>();
assert_eq!(name_list, ok_names_types);
Expand Down

0 comments on commit c7f121c

Please sign in to comment.