File tree 1 file changed +12
-14
lines changed
1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -34,21 +34,19 @@ pub fn doc(ws: &Workspace, options: &DocOptions) -> CargoResult<()> {
34
34
35
35
let mut lib_names = HashSet :: new ( ) ;
36
36
let mut bin_names = HashSet :: new ( ) ;
37
- if specs. is_empty ( ) {
38
- for package in & pkgs {
39
- for target in package. targets ( ) . iter ( ) . filter ( |t| t. documented ( ) ) {
40
- if target. is_lib ( ) {
41
- assert ! ( lib_names. insert( target. crate_name( ) ) ) ;
42
- } else {
43
- assert ! ( bin_names. insert( target. crate_name( ) ) ) ;
44
- }
37
+ for package in & pkgs {
38
+ for target in package. targets ( ) . iter ( ) . filter ( |t| t. documented ( ) ) {
39
+ if target. is_lib ( ) {
40
+ assert ! ( lib_names. insert( target. crate_name( ) ) ) ;
41
+ } else {
42
+ assert ! ( bin_names. insert( target. crate_name( ) ) ) ;
45
43
}
46
- for bin in bin_names . iter ( ) {
47
- if lib_names . contains ( bin ) {
48
- bail ! ( "cannot document a package where a library and a binary \
49
- have the same name. Consider renaming one or marking \
50
- the target as `doc = false`" )
51
- }
44
+ }
45
+ for bin in bin_names . iter ( ) {
46
+ if lib_names . contains ( bin ) {
47
+ bail ! ( "cannot document a package where a library and a binary \
48
+ have the same name. Consider renaming one or marking \
49
+ the target as `doc = false`" )
52
50
}
53
51
}
54
52
}
You can’t perform that action at this time.
0 commit comments