22
33#![ deny( warnings) ]
44
5- use tidy:: features:: { Feature , Features , collect_lib_features, collect_lang_features} ;
5+ use tidy:: features:: { Features , collect_lib_features, collect_lang_features} ;
66use tidy:: unstable_book:: { collect_unstable_feature_names, collect_unstable_book_section_file_names,
77 PATH_STR , LANG_FEATURES_DIR , LIB_FEATURES_DIR } ;
88use std:: collections:: BTreeSet ;
@@ -70,15 +70,6 @@ fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Featur
7070
7171}
7272
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-
8273fn generate_unstable_book_files ( src : & Path , out : & Path , features : & Features ) {
8374 let unstable_features = collect_unstable_feature_names ( features) ;
8475 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) {
8980 let out_file_path = out. join ( & file_name) ;
9081 let feature = & features[ & feature_name_underscore] ;
9182
92- if has_valid_tracking_issue ( & feature ) {
83+ if let Some ( issue ) = feature . tracking_issue {
9384 generate_stub_issue ( & out_file_path,
9485 & feature_name_underscore,
95- feature . tracking_issue . unwrap ( ) ) ;
86+ issue . get ( ) ) ;
9687 } else {
9788 generate_stub_no_issue ( & out_file_path, & feature_name_underscore) ;
9889 }
0 commit comments