Skip to content

Commit 7630aa7

Browse files
leoyvensevaporei
authored andcommitted
graph: Fix rust 1.59 warning, bump edition
1 parent 1c0b23a commit 7630aa7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

graph/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "graph"
33
version = "0.25.1"
4-
edition = "2018"
4+
edition = "2021"
55

66
[dependencies]
77
anyhow = "1.0"

graph/src/data/schema.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,15 +643,14 @@ impl Schema {
643643
&self,
644644
schemas: &HashMap<SchemaReference, Arc<Schema>>,
645645
) -> Result<(), Vec<SchemaValidationError>> {
646-
// Using this since std::array's .into_iter() doesn't work
647-
// as expected (at least as of rustc 1.53)
648-
let mut errors: Vec<SchemaValidationError> = std::array::IntoIter::new([
646+
let mut errors: Vec<SchemaValidationError> = [
649647
self.validate_schema_types(),
650648
self.validate_derived_from(),
651649
self.validate_schema_type_has_no_fields(),
652650
self.validate_directives_on_schema_type(),
653651
self.validate_reserved_types_usage(),
654-
])
652+
]
653+
.into_iter()
655654
.filter(Result::is_err)
656655
// Safe unwrap due to the filter above
657656
.map(Result::unwrap_err)

0 commit comments

Comments
 (0)