Skip to content

Commit

Permalink
graph: Fix rust 1.59 warning, bump edition
Browse files Browse the repository at this point in the history
  • Loading branch information
leoyvens authored and evaporei committed Mar 5, 2022
1 parent 1c0b23a commit 7630aa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion graph/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "graph"
version = "0.25.1"
edition = "2018"
edition = "2021"

[dependencies]
anyhow = "1.0"
Expand Down
7 changes: 3 additions & 4 deletions graph/src/data/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,15 +643,14 @@ impl Schema {
&self,
schemas: &HashMap<SchemaReference, Arc<Schema>>,
) -> Result<(), Vec<SchemaValidationError>> {
// Using this since std::array's .into_iter() doesn't work
// as expected (at least as of rustc 1.53)
let mut errors: Vec<SchemaValidationError> = std::array::IntoIter::new([
let mut errors: Vec<SchemaValidationError> = [
self.validate_schema_types(),
self.validate_derived_from(),
self.validate_schema_type_has_no_fields(),
self.validate_directives_on_schema_type(),
self.validate_reserved_types_usage(),
])
]
.into_iter()
.filter(Result::is_err)
// Safe unwrap due to the filter above
.map(Result::unwrap_err)
Expand Down

0 comments on commit 7630aa7

Please sign in to comment.