projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7067bc8
)
use impl Trait
author
Eh2406
<YeomanYaacov@gmail.com>
Wed, 9 May 2018 17:20:25 +0000
(13:20 -0400)
committer
Eh2406
<YeomanYaacov@gmail.com>
Thu, 10 May 2018 18:04:05 +0000
(14:04 -0400)
src/cargo/core/resolver/types.rs
patch
|
blob
|
history
diff --git
a/src/cargo/core/resolver/types.rs
b/src/cargo/core/resolver/types.rs
index 543c72e7e4a69f633247b8c3aace3f3aa42cba2a..1190121dae4ecf0621d270af5f5f9e66b9299717 100644
(file)
--- a/
src/cargo/core/resolver/types.rs
+++ b/
src/cargo/core/resolver/types.rs
@@
-206,13
+206,10
@@
impl DepsFrame {
.unwrap_or(0)
}
- pub fn flatten<'s>(&'s self) -> Box<Iterator<Item = (&PackageId, Dependency)> + 's> {
- // TODO: with impl Trait the Box can be removed
- Box::new(
- self.remaining_siblings
- .clone()
- .map(move |(_, (d, _, _))| (self.parent.package_id(), d)),
- )
+ pub fn flatten<'s>(&'s self) -> impl Iterator<Item=(&PackageId, Dependency)> + 's {
+ self.remaining_siblings
+ .clone()
+ .map(move |(_, (d, _, _))| (self.parent.package_id(), d))
}
}