Skip to content

Commit 210d4b3

Browse files
committed
Problem: calling .flatten() from itertools fails on nightly
``` --> sit-web/src/webapp.rs:202:32 | 202 | let record = match sit_core::repository::IssueRecordIter::flatten(issue.record_iter().unwrap()).find(|r| r.encoded_hash() == record) { | ^^^^^^^ multiple `flatten` found | = note: candidate #1 is defined in an impl of the trait `std::iter::Iterator` for the type `sit_core::repository::IssueRecordIter<'_>` = note: candidate #2 is defined in an impl of the trait `itertools::Itertools` for the type `_` = note: candidate #3 is defined in the trait `rayon::iter::ParallelIterator` ``` This is, perhaps, related to the addition of the [`iterator_flatten` nightly feature](rust-lang/rust#48213). Solution: use itertools' version explicitly
1 parent ffec039 commit 210d4b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sit-web/src/webapp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ pub fn start<A: ToSocketAddrs>(addr: A, config: sit_core::cfg::Configuration, re
199199
Some(issue) => issue,
200200
None => return Response::empty_404(),
201201
};
202-
let record = match issue.record_iter().unwrap().flatten().find(|r| r.encoded_hash() == record) {
202+
let record = match ::itertools::Itertools::flatten(issue.record_iter().unwrap()).find(|r| r.encoded_hash() == record) {
203203
Some(record) => record,
204204
None => return Response::empty_404(),
205205
};

0 commit comments

Comments
 (0)