adaptors.rs
Contains an unbounded block loop
SHA-2563f7b723918fbc7326068fdaf4c1e375beddc3c9688db4d9e559616d3691e4b8e
MaleculeH(Db)
Evidence
1//! Licensed under the Apache License, Version 2.0
2//! http://www.apache.org/licenses/LICENSE-2.0 or the MIT license
3/ …
3:13… pensource.org/licenses/MIT, at your
4//! option. This file may not be copied, modified, or distributed
5//! except according to those terms.
6
7use std::mem;
8#[cfg(feature = "unstable")]
9use std::num::One;
10#[cfg(feature = "unstable")]
11use std::ops::Add;
12use std::cmp::Ordering;
13use std::iter::{Fuse, Peekable};
14use std::collections::HashSet;
15use std::hash::Hash;
16use Itertools;
17use size_hint;
18
19macro_rules! clone_fields {
20 ($name:ident, $base:expr, $($field:ident),+) => (
21 $na …
⋯4 lines
28
29
30/// An iterator adaptor that alternates elements from two iterators until both
31/// run out.
32///
33/// This iterator is *fused* …
134:25… e, b: usize) -> Option<usize> {
135 use std::cmp::min;
136 2usize.checked_mul(min(a, b))
137 .and_then(|lhs| lhs.checked_add(if a …
1018:7… pe Item = I::Item;
1019
1020 fn next(&mut self) -> Option<I::Item> {
1021 loop {
1022 match self.iter.next() {
1023 None => return None,
1024 Some(v) => {
1025 let …