210210#![ deny( warnings) ]
211211#![ deny( missing_docs) ]
212212#![ deny( clippy:: disallowed_methods) ]
213+ #![ warn( clippy:: doc_markdown) ]
213214
214215use std:: borrow:: Cow ;
215216use std:: collections:: HashMap ;
@@ -1277,7 +1278,8 @@ impl Build {
12771278
12781279 /// Run the compiler, generating the file `output`
12791280 ///
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.
12811283 pub fn try_compile ( & self , output : & str ) -> Result < ( ) , Error > {
12821284 let mut output_components = Path :: new ( output) . components ( ) ;
12831285 match ( output_components. next ( ) , output_components. next ( ) ) {
@@ -1716,7 +1718,8 @@ impl Build {
17161718 Ok ( ( cmd, name) )
17171719 }
17181720
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.
17201723 pub fn try_expand ( & self ) -> Result < Vec < u8 > , Error > {
17211724 let compiler = self . try_get_compiler ( ) ?;
17221725 let mut cmd = compiler. to_command ( ) ;
@@ -2470,14 +2473,14 @@ impl Build {
24702473 cmd. arg ( "-PreDefine" ) ;
24712474 if let Some ( ref value) = * value {
24722475 if let Ok ( i) = value. parse :: < i32 > ( ) {
2473- cmd. arg ( & format ! ( "{} SETA {}" , key, i) ) ;
2476+ cmd. arg ( format ! ( "{} SETA {}" , key, i) ) ;
24742477 } else if value. starts_with ( '"' ) && value. ends_with ( '"' ) {
2475- cmd. arg ( & format ! ( "{} SETS {}" , key, value) ) ;
2478+ cmd. arg ( format ! ( "{} SETS {}" , key, value) ) ;
24762479 } else {
2477- cmd. arg ( & format ! ( "{} SETS \" {}\" " , key, value) ) ;
2480+ cmd. arg ( format ! ( "{} SETS \" {}\" " , key, value) ) ;
24782481 }
24792482 } else {
2480- cmd. arg ( & format ! ( "{} SETL {}" , key, "{TRUE}" ) ) ;
2483+ cmd. arg ( format ! ( "{} SETL {}" , key, "{TRUE}" ) ) ;
24812484 }
24822485 }
24832486 } else {
@@ -2487,9 +2490,9 @@ impl Build {
24872490
24882491 for ( key, value) in self . definitions . iter ( ) {
24892492 if let Some ( ref value) = * value {
2490- cmd. arg ( & format ! ( "-D{}={}" , key, value) ) ;
2493+ cmd. arg ( format ! ( "-D{}={}" , key, value) ) ;
24912494 } else {
2492- cmd. arg ( & format ! ( "-D{}" , key) ) ;
2495+ cmd. arg ( format ! ( "-D{}" , key) ) ;
24932496 }
24942497 }
24952498 }
@@ -4016,7 +4019,7 @@ impl Build {
40164019 // clang driver appears to be forcing UTF-8 output even on Windows,
40174020 // hence from_utf8 is assumed to be usable in all cases.
40184021 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' ] ) {
40204023 if let Some ( path) = dirs. strip_prefix ( "programs: =" ) {
40214024 return self . which ( prog, Some ( OsStr :: new ( path) ) ) ;
40224025 }
0 commit comments