Conversation
|
r? @matklad (rust_highfive has picked a reviewer for you, use r? to override) |
|
@bors: r+ Thanks! |
|
📌 Commit 33bcccb has been approved by |
|
@alexcrichton, I understand that implicitly raising the minimal rust version required to compile cargo is a non-problem? |
|
Indeed! |
|
⌛ Testing commit 33bcccb with merge f5fafbe241a77c26cc04b14c655d6faac5ebbced... |
| let cfg_color = self.get_string("term.color").unwrap_or(None).map(|v| v.val); | ||
|
|
||
| let color = color.as_ref().or(cfg_color.as_ref()); | ||
| let color = color.as_ref().or_else(|| cfg_color.as_ref()); |
There was a problem hiding this comment.
there are a bunch of .foo(|| someFunc()) in this PR - can any of them be rewritten by passing the function directly: .foo(someFunc)? In this case, that would be color.as_ref().or_else(cfg_color.as_ref).
Note that in this specific case something even better is possible: color.or(cfg_color).as_ref()
There was a problem hiding this comment.
You are right, that was an oversight. I have many more changes waiting and will incorporate this in the next PR.
|
💥 Test timed out |
|
@bors: retry |
Cleaning lints I've started to clean some minor defects in cargo. This is the first commit of possibly many. Requesting advice if this is actually wanted; #cargo was positive. Some things raise the minimum version of rust required to compile cargo. E.g. `assert_ne!(foo, bar)` instead of `assert!(foo != bar)` requires (iirc) rust 1.13. Any advice on that in particular?
|
☀️ Test successful - status-appveyor, status-travis |
I've started to clean some minor defects in cargo. This is the first commit of possibly many.
Requesting advice if this is actually wanted; #cargo was positive.
Some things raise the minimum version of rust required to compile cargo. E.g.
assert_ne!(foo, bar)instead ofassert!(foo != bar)requires (iirc) rust 1.13. Any advice on that in particular?