File tree 4 files changed +5
-3
lines changed
crates/cargo-test-support/src 4 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1233,7 +1233,7 @@ impl Execs {
1233
1233
None => failures. push ( e_line) ,
1234
1234
}
1235
1235
}
1236
- if failures. len ( ) > 0 {
1236
+ if ! failures. is_empty ( ) {
1237
1237
return Err ( format ! (
1238
1238
"Did not find expected line(s):\n {}\n \
1239
1239
Remaining available output:\n {}\n ",
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ pub(super) fn activation_error(
254
254
if let Err ( e) = registry. query ( & new_dep, & mut |s| candidates. push ( s) , true ) {
255
255
return to_resolve_err ( e) ;
256
256
} ;
257
- candidates. sort_unstable_by ( |a, b | a. name ( ) . cmp ( & b . name ( ) ) ) ;
257
+ candidates. sort_unstable_by_key ( |a| a. name ( ) ) ;
258
258
candidates. dedup_by ( |a, b| a. name ( ) == b. name ( ) ) ;
259
259
let mut candidates: Vec < _ > = candidates
260
260
. iter ( )
Original file line number Diff line number Diff line change @@ -901,7 +901,7 @@ pub fn fetch(
901
901
902
902
GitReference :: DefaultBranch => {
903
903
// See the module docs for why we're fetching `master` here.
904
- refspecs. push ( format ! ( "refs/heads/master:refs/remotes/origin/master" ) ) ;
904
+ refspecs. push ( String :: from ( "refs/heads/master:refs/remotes/origin/master" ) ) ;
905
905
refspecs. push ( String :: from ( "HEAD:refs/remotes/origin/HEAD" ) ) ;
906
906
}
907
907
Original file line number Diff line number Diff line change @@ -1870,6 +1870,8 @@ fn long_file_names() {
1870
1870
test_path. mkdir_p ( ) ;
1871
1871
let test_path = test_path. join ( long_name) ;
1872
1872
if let Err ( e) = File :: create ( & test_path) {
1873
+ // write to stderr directly to avoid output from being captured
1874
+ // and always display text, even without --nocapture
1873
1875
use std:: io:: Write ;
1874
1876
writeln ! (
1875
1877
std:: io:: stderr( ) ,
You can’t perform that action at this time.
0 commit comments