File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[package ]
22name = " sql_docs"
3- version = " 1.3.0 "
3+ version = " 1.3.1 "
44edition = " 2024"
55description = " A crate for parsing comments from sql files and using them for documentation generation"
66documentation = " https://docs.rs/sql_docs"
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ edition = "2024"
22max_width = 100
33use_small_heuristics = " Max"
44reorder_imports = true
5- reorder_modules = true
5+ reorder_modules = true
Original file line number Diff line number Diff line change @@ -236,15 +236,14 @@ impl Comments {
236236 let mut start_line = 1u64 ;
237237 let mut start_col = 1u64 ;
238238
239- let mut line_num = 1u64 ;
240239 let mut col;
241240
242241 let mut in_single = false ;
243242 let mut in_multi = false ;
244243
245244 let mut buf = String :: new ( ) ;
246245
247- for line in src. lines ( ) {
246+ for ( line_num , line) in ( 1u64 .. ) . zip ( src. lines ( ) ) {
248247 col = 1 ;
249248 let mut chars = line. chars ( ) . peekable ( ) ;
250249 while let Some ( c) = chars. next ( ) {
@@ -326,7 +325,6 @@ impl Comments {
326325 } else if in_multi {
327326 buf. push ( '\n' ) ;
328327 }
329- line_num += 1 ;
330328 }
331329 // EOF: close any open comments
332330 if in_multi {
You can’t perform that action at this time.
0 commit comments