210
210
#![ deny( warnings) ]
211
211
#![ deny( missing_docs) ]
212
212
#![ deny( clippy:: disallowed_methods) ]
213
+ #![ warn( clippy:: doc_markdown) ]
213
214
214
215
use std:: borrow:: Cow ;
215
216
use std:: collections:: HashMap ;
@@ -1277,7 +1278,8 @@ impl Build {
1277
1278
1278
1279
/// Run the compiler, generating the file `output`
1279
1280
///
1280
- /// This will return a result instead of panicking; see compile() for the complete description.
1281
+ /// This will return a result instead of panicking; see [`Self::compile()`] for
1282
+ /// the complete description.
1281
1283
pub fn try_compile ( & self , output : & str ) -> Result < ( ) , Error > {
1282
1284
let mut output_components = Path :: new ( output) . components ( ) ;
1283
1285
match ( output_components. next ( ) , output_components. next ( ) ) {
@@ -1716,7 +1718,8 @@ impl Build {
1716
1718
Ok ( ( cmd, name) )
1717
1719
}
1718
1720
1719
- /// This will return a result instead of panicking; see expand() for the complete description.
1721
+ /// This will return a result instead of panicking; see [`Self::expand()`] for
1722
+ /// the complete description.
1720
1723
pub fn try_expand ( & self ) -> Result < Vec < u8 > , Error > {
1721
1724
let compiler = self . try_get_compiler ( ) ?;
1722
1725
let mut cmd = compiler. to_command ( ) ;
@@ -2470,14 +2473,14 @@ impl Build {
2470
2473
cmd. arg ( "-PreDefine" ) ;
2471
2474
if let Some ( ref value) = * value {
2472
2475
if let Ok ( i) = value. parse :: < i32 > ( ) {
2473
- cmd. arg ( & format ! ( "{} SETA {}" , key, i) ) ;
2476
+ cmd. arg ( format ! ( "{} SETA {}" , key, i) ) ;
2474
2477
} else if value. starts_with ( '"' ) && value. ends_with ( '"' ) {
2475
- cmd. arg ( & format ! ( "{} SETS {}" , key, value) ) ;
2478
+ cmd. arg ( format ! ( "{} SETS {}" , key, value) ) ;
2476
2479
} else {
2477
- cmd. arg ( & format ! ( "{} SETS \" {}\" " , key, value) ) ;
2480
+ cmd. arg ( format ! ( "{} SETS \" {}\" " , key, value) ) ;
2478
2481
}
2479
2482
} else {
2480
- cmd. arg ( & format ! ( "{} SETL {}" , key, "{TRUE}" ) ) ;
2483
+ cmd. arg ( format ! ( "{} SETL {}" , key, "{TRUE}" ) ) ;
2481
2484
}
2482
2485
}
2483
2486
} else {
@@ -2487,9 +2490,9 @@ impl Build {
2487
2490
2488
2491
for ( key, value) in self . definitions . iter ( ) {
2489
2492
if let Some ( ref value) = * value {
2490
- cmd. arg ( & format ! ( "-D{}={}" , key, value) ) ;
2493
+ cmd. arg ( format ! ( "-D{}={}" , key, value) ) ;
2491
2494
} else {
2492
- cmd. arg ( & format ! ( "-D{}" , key) ) ;
2495
+ cmd. arg ( format ! ( "-D{}" , key) ) ;
2493
2496
}
2494
2497
}
2495
2498
}
@@ -4016,7 +4019,7 @@ impl Build {
4016
4019
// clang driver appears to be forcing UTF-8 output even on Windows,
4017
4020
// hence from_utf8 is assumed to be usable in all cases.
4018
4021
let search_dirs = std:: str:: from_utf8 ( & search_dirs) . ok ( ) ?;
4019
- for dirs in search_dirs. split ( |c| c == '\r' || c == '\n' ) {
4022
+ for dirs in search_dirs. split ( [ '\r' , '\n' ] ) {
4020
4023
if let Some ( path) = dirs. strip_prefix ( "programs: =" ) {
4021
4024
return self . which ( prog, Some ( OsStr :: new ( path) ) ) ;
4022
4025
}
0 commit comments