2
2
3
3
#![ deny( warnings) ]
4
4
5
- use tidy:: features:: { Feature , Features , collect_lib_features, collect_lang_features} ;
5
+ use tidy:: features:: { Features , collect_lib_features, collect_lang_features} ;
6
6
use tidy:: unstable_book:: { collect_unstable_feature_names, collect_unstable_book_section_file_names,
7
7
PATH_STR , LANG_FEATURES_DIR , LIB_FEATURES_DIR } ;
8
8
use std:: collections:: BTreeSet ;
@@ -70,15 +70,6 @@ fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Featur
70
70
71
71
}
72
72
73
- fn has_valid_tracking_issue ( f : & Feature ) -> bool {
74
- if let Some ( n) = f. tracking_issue {
75
- if n > 0 {
76
- return true ;
77
- }
78
- }
79
- false
80
- }
81
-
82
73
fn generate_unstable_book_files ( src : & Path , out : & Path , features : & Features ) {
83
74
let unstable_features = collect_unstable_feature_names ( features) ;
84
75
let unstable_section_file_names = collect_unstable_book_section_file_names ( src) ;
@@ -89,10 +80,10 @@ fn generate_unstable_book_files(src :&Path, out: &Path, features :&Features) {
89
80
let out_file_path = out. join ( & file_name) ;
90
81
let feature = & features[ & feature_name_underscore] ;
91
82
92
- if has_valid_tracking_issue ( & feature ) {
83
+ if let Some ( issue ) = feature . tracking_issue {
93
84
generate_stub_issue ( & out_file_path,
94
85
& feature_name_underscore,
95
- feature . tracking_issue . unwrap ( ) ) ;
86
+ issue . get ( ) ) ;
96
87
} else {
97
88
generate_stub_no_issue ( & out_file_path, & feature_name_underscore) ;
98
89
}
0 commit comments