Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3f9bddc

Browse files
committedFeb 29, 2020
Auto merge of #69570 - Dylan-DPC:rollup-d6boczt, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #69477 (docs: add mention of async blocks in move keyword docs) - #69504 (Use assert_ne in hash tests) - #69546 (use to_vec() instead of .iter().cloned().collect() to convert slices to vecs.) - #69551 (use is_empty() instead of len() == x to determine if structs are empty.) - #69563 (Fix no_std detection for target triples) - #69567 (use .to_string() instead of format!() macro to create strings) Failed merges: r? @ghost
2 parents 04e7f96 + bbfec7c commit 3f9bddc

File tree

70 files changed

+152
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+152
-141
lines changed
 

‎src/bootstrap/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ pub struct Target {
180180
impl Target {
181181
pub fn from_triple(triple: &str) -> Self {
182182
let mut target: Self = Default::default();
183-
if triple.contains("-none-") || triple.contains("nvptx") {
183+
if triple.contains("-none") || triple.contains("nvptx") {
184184
target.no_std = true;
185185
}
186186
target

‎src/libcore/slice/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3823,7 +3823,7 @@ where
38233823
// The last index of self.v is already checked and found to match
38243824
// by the last iteration, so we start searching a new match
38253825
// one index to the left.
3826-
let remainder = if self.v.len() == 0 { &[] } else { &self.v[..(self.v.len() - 1)] };
3826+
let remainder = if self.v.is_empty() { &[] } else { &self.v[..(self.v.len() - 1)] };
38273827
let idx = remainder.iter().rposition(|x| (self.pred)(x)).map(|idx| idx + 1).unwrap_or(0);
38283828
if idx == 0 {
38293829
self.finished = true;
@@ -4033,7 +4033,7 @@ where
40334033
return None;
40344034
}
40354035

4036-
let idx_opt = if self.v.len() == 0 {
4036+
let idx_opt = if self.v.is_empty() {
40374037
None
40384038
} else {
40394039
// work around borrowck limitations

0 commit comments

Comments
 (0)