File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -611,14 +611,13 @@ impl Config {
611
611
/// This is only relevant for C and C++ files.
612
612
///
613
613
/// # Panics
614
- /// Panics if more than one file is present in the config, as macro
615
- /// expansion only makes sense for a single file.
614
+ /// Panics if more than one file is present in the config.
616
615
///
617
616
/// # Example
618
617
/// ```no_run
619
618
/// let out = gcc::Config::new()
620
- /// .file("src/foo.c")
621
- /// .expand();
619
+ /// .file("src/foo.c")
620
+ /// .expand();
622
621
/// ```
623
622
pub fn expand ( & self ) -> Vec < u8 > {
624
623
let compiler = self . get_compiler ( ) ;
@@ -628,8 +627,8 @@ impl Config {
628
627
}
629
628
cmd. arg ( compiler. family . expand_flag ( ) ) ;
630
629
631
- assert_eq ! ( self . files. len( ) , 1 ,
632
- "Expand may only be called for a single file" ) ;
630
+ assert ! ( self . files. len( ) <= 1 ,
631
+ "Expand may only be called for a single file" ) ;
633
632
634
633
for file in self . files . iter ( ) {
635
634
cmd. arg ( file) ;
You can’t perform that action at this time.
0 commit comments