Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 11 pull requests #61741

Merged
merged 32 commits into from
Jun 12, 2019
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e02f133
move intrinsics codegen tests into a seperate folder
lcnr Jun 4, 2019
4c44d4a
improve test indentation
lcnr Jun 4, 2019
36601f6
Windows 10 SDK is also required now.
sfengyuan Jun 5, 2019
1cf662e
rephrase
sfengyuan Jun 7, 2019
3d6070d
Neutralize link
sfengyuan Jun 7, 2019
1a32a68
Mention slice patterns
JohnTitor Jun 8, 2019
41e976b
Azure: retry failed awscli installs
wesleywiser Jun 10, 2019
8e7ade8
Reword const fn conditional and loop error text
czipperz Jun 10, 2019
3cfceb9
Add an example
JohnTitor Jun 10, 2019
e3516a1
librustc_errors: Add some more documentation
phansch Jun 9, 2019
33137ff
Address review comments
phansch Jun 10, 2019
7b97cf9
make sure to_ascii_lowercase actually leaves upper-case non-ASCII cha…
RalfJung Jun 10, 2019
9ed4674
typeck: Fix const generic in repeat param ICE.
davidtwco Jun 9, 2019
d3461bf
core: use memcmp optimization for 128 bit integer slices
aschampion Jun 10, 2019
97f4e70
syntax: Remove `SyntaxExtension::IdentTT` and `IdentMacroExpander`
petrochenkov Jun 6, 2019
5a6ebec
syntax: Remove `SyntaxExtension::MultiDecorator` and `MultiItemDecora…
petrochenkov Jun 6, 2019
edb925a
syntax: Use `MultiItemModifier` for built-in derives
petrochenkov Jun 6, 2019
8edbbac
syntax: Remove `SyntaxExtension::DeclMacro`
petrochenkov Jun 6, 2019
0468eb6
syntax: Improve documentation of `SyntaxExtension`
petrochenkov Jun 6, 2019
93eb63c
syntax: Rename variants of `SyntaxExtension` for consistency
petrochenkov Jun 6, 2019
c127f53
Use `for_each` in `Iterator::partition`
cuviper Jun 10, 2019
17393b2
Rollup merge of #61518 - czipperz:const-fn-doc-disallow-loops, r=Centril
Centril Jun 11, 2019
c2bb8b9
Rollup merge of #61526 - lcnr:test_reorder, r=nikomatsakis
Centril Jun 11, 2019
b81986c
Rollup merge of #61550 - jacobsun:patch-1, r=alexcrichton
Centril Jun 11, 2019
b4419a8
Rollup merge of #61606 - petrochenkov:legclean, r=pnkfelix
Centril Jun 11, 2019
79ac254
Rollup merge of #61652 - JohnTitor:docs-improve-array, r=Centril
Centril Jun 11, 2019
b316955
Rollup merge of #61686 - phansch:librustc_errors_docs, r=estebank
Centril Jun 11, 2019
bd57c18
Rollup merge of #61698 - davidtwco:ice-const-generic-length, r=varkor
Centril Jun 11, 2019
e6a948f
Rollup merge of #61707 - wesleywiser:awscli_retry, r=alexcrichton
Centril Jun 11, 2019
231b037
Rollup merge of #61715 - RalfJung:test-ascii-lowercase, r=varkor
Centril Jun 11, 2019
2f1d360
Rollup merge of #61724 - aschampion:128-bit-memcmp, r=sfackler
Centril Jun 11, 2019
681712b
Rollup merge of #61726 - cuviper:partition-for_each, r=scottmcm
Centril Jun 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use for_each in Iterator::partition
We already use this for `unzip`, but `partition` is not much different.
  • Loading branch information
cuviper committed Jun 10, 2019
commit c127f537e9bfbe844a78ba542d41bea8aa26aa89
4 changes: 2 additions & 2 deletions src/libcore/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
@@ -1495,13 +1495,13 @@ pub trait Iterator {
let mut left: B = Default::default();
let mut right: B = Default::default();

for x in self {
self.for_each(|x| {
if f(&x) {
left.extend(Some(x))
} else {
right.extend(Some(x))
}
}
});

(left, right)
}