@@ -89,12 +89,9 @@ edition = "2021"
8989 let src_path = temp_dir_path. join ( "src" ) ;
9090 create_dir_all ( & src_path) ?;
9191 File :: create ( src_path. join ( "lib.rs" ) ) ?;
92- eprintln ! ( "[DEBUG] Created empty src/lib.rs at: {}" , src_path. join( "lib.rs" ) . display( ) ) ;
9392
9493 let mut temp_manifest_file = File :: create ( & temp_manifest_path) ?;
9594 temp_manifest_file. write_all ( cargo_toml_content. as_bytes ( ) ) ?;
96- eprintln ! ( "[DEBUG] Created temporary manifest at: {}" , temp_manifest_path. display( ) ) ;
97- eprintln ! ( "[DEBUG] Temporary Manifest Content:\n {}" , cargo_toml_content) ; // Log content
9895
9996
10097 // --- Use Cargo API ---
@@ -115,10 +112,8 @@ edition = "2021"
115112
116113 // Use the temporary manifest path for the Workspace
117114 let mut ws = Workspace :: new ( & temp_manifest_path, & config) ?; // Make ws mutable
118- eprintln ! ( "[DEBUG] Workspace target dir before set: {}" , ws. target_dir( ) . as_path_unlocked( ) . display( ) ) ;
119115 // Set target_dir directly on Workspace
120116 ws. set_target_dir ( cargo:: util:: Filesystem :: new ( temp_dir_path. to_path_buf ( ) ) ) ;
121- eprintln ! ( "[DEBUG] Workspace target dir after set: {}" , ws. target_dir( ) . as_path_unlocked( ) . display( ) ) ;
122117
123118 // Create CompileOptions, relying on ::new for BuildConfig
124119 let mut compile_opts = CompileOptions :: new ( & config, cargo:: core:: compiler:: CompileMode :: Doc { deps : false , json : false } ) ?;
@@ -133,40 +128,30 @@ edition = "2021"
133128 open_result : false , // Don't open in browser
134129 output_format : ops:: OutputFormat :: Html ,
135130 } ;
136- eprintln ! ( "[DEBUG] package_spec for CompileOptions: '{}'" , package_spec) ;
137131
138- // Debug print relevant options before calling ops::doc
139- eprintln ! ( "[DEBUG] CompileOptions spec: {:?}" , doc_opts. compile_opts. spec) ;
140- eprintln ! ( "[DEBUG] CompileOptions cli_features: {:?}" , doc_opts. compile_opts. cli_features) ; // Features for temp crate
141- eprintln ! ( "[DEBUG] CompileOptions build_config mode: {:?}" , doc_opts. compile_opts. build_config. mode) ;
142- eprintln ! ( "[DEBUG] DocOptions output_format: {:?}" , doc_opts. output_format) ;
143132
144133 ops:: doc ( & ws, & doc_opts) . map_err ( DocLoaderError :: CargoLib ) ?; // Use ws
145134 // --- End Cargo API ---
146135
147136 // --- Find the actual documentation directory ---
148137 // Iterate through subdirectories in `target/doc` and find the one containing `index.html`.
149138 let base_doc_path = temp_dir_path. join ( "doc" ) ;
150- eprintln ! ( "[DEBUG] Base doc path: {}" , base_doc_path. display( ) ) ;
151139
152140 let mut target_docs_path: Option < PathBuf > = None ;
153141 let mut found_count = 0 ;
154142
155143 if base_doc_path. is_dir ( ) {
156144 for entry_result in fs:: read_dir ( & base_doc_path) ? {
157145 let entry = entry_result?;
158- eprintln ! ( "[DEBUG] Checking directory entry: {}" , entry. path( ) . display( ) ) ; // Log entry being checked
159146 if entry. file_type ( ) ?. is_dir ( ) {
160147 let dir_path = entry. path ( ) ;
161148 let index_html_path = dir_path. join ( "index.html" ) ;
162149 if index_html_path. is_file ( ) {
163- eprintln ! ( "[DEBUG] Found potential docs directory with index.html: {}" , dir_path. display( ) ) ;
164150 if target_docs_path. is_none ( ) {
165151 target_docs_path = Some ( dir_path) ;
166152 }
167153 found_count += 1 ;
168154 } else {
169- eprintln ! ( "[DEBUG] Skipping directory without index.html: {}" , dir_path. display( ) ) ;
170155 }
171156 }
172157 }
@@ -198,9 +183,6 @@ edition = "2021"
198183 // This might need adjustment based on the exact rustdoc version/theme
199184 let content_selector = Selector :: parse ( "section#main-content.content" )
200185 . map_err ( |e| DocLoaderError :: Selector ( e. to_string ( ) ) ) ?;
201- eprintln ! ( "[DEBUG] Calculated final docs_path: {}" , docs_path. display( ) ) ;
202-
203- eprintln ! ( "Starting document loading from: {}" , docs_path. display( ) ) ;
204186
205187 for entry in WalkDir :: new ( & docs_path)
206188 . into_iter ( )
0 commit comments