@@ -874,12 +874,12 @@ fn extern_location(e: &clean::ExternalCrate, dst: &Path) -> ExternalLocation {
874874impl < ' a > DocFolder for SourceCollector < ' a > {
875875 fn fold_item ( & mut self , item : clean:: Item ) -> Option < clean:: Item > {
876876 // If we're including source files, and we haven't seen this file yet,
877- // then we need to render it out to the filesystem
877+ // then we need to render it out to the filesystem.
878878 if self . scx . include_sources
879879 // skip all invalid spans
880880 && item. source . filename != ""
881- // macros from other libraries get special filenames which we can
882- // safely ignore
881+ // Macros from other libraries get special filenames which we can
882+ // safely ignore.
883883 && !( item. source . filename . starts_with ( "<" )
884884 && item. source . filename . ends_with ( "macros>" ) ) {
885885
@@ -974,13 +974,13 @@ impl DocFolder for Cache {
974974 } ;
975975
976976 // Register any generics to their corresponding string. This is used
977- // when pretty-printing types
977+ // when pretty-printing types.
978978 if let Some ( generics) = item. inner . generics ( ) {
979979 self . generics ( generics) ;
980980 }
981981
982- // Propagate a trait methods' documentation to all implementors of the
983- // trait
982+ // Propagate a trait method's documentation to all implementors of the
983+ // trait.
984984 if let clean:: TraitItem ( ref t) = item. inner {
985985 self . traits . entry ( item. def_id ) . or_insert_with ( || t. clone ( ) ) ;
986986 }
@@ -996,7 +996,7 @@ impl DocFolder for Cache {
996996 }
997997 }
998998
999- // Index this method for searching later on
999+ // Index this method for searching later on.
10001000 if let Some ( ref s) = item. name {
10011001 let ( parent, is_inherent_impl_item) = match item. inner {
10021002 clean:: StrippedItem ( ..) => ( ( None , None ) , false ) ,
@@ -1097,8 +1097,8 @@ impl DocFolder for Cache {
10971097 ( self . stack . clone ( ) , item. type_ ( ) ) ) ;
10981098 }
10991099 }
1100- // link variants to their parent enum because pages aren't emitted
1101- // for each variant
1100+ // Link variants to their parent enum because pages aren't emitted
1101+ // for each variant.
11021102 clean:: VariantItem ( ..) if !self . stripped_mod => {
11031103 let mut stack = self . stack . clone ( ) ;
11041104 stack. pop ( ) ;
@@ -1144,8 +1144,8 @@ impl DocFolder for Cache {
11441144 _ => false
11451145 } ;
11461146
1147- // Once we've recursively found all the generics, then hoard off all the
1148- // implementations elsewhere
1147+ // Once we've recursively found all the generics, hoard off all the
1148+ // implementations elsewhere.
11491149 let ret = self . fold_item_recur ( item) . and_then ( |item| {
11501150 if let clean:: Item { inner : clean:: ImplItem ( _) , .. } = item {
11511151 // Figure out the id of this impl. This may map to a
@@ -1206,7 +1206,7 @@ impl Context {
12061206 }
12071207
12081208 /// Recurse in the directory structure and change the "root path" to make
1209- /// sure it always points to the top (relatively)
1209+ /// sure it always points to the top (relatively).
12101210 fn recurse < T , F > ( & mut self , s : String , f : F ) -> T where
12111211 F : FnOnce ( & mut Context ) -> T ,
12121212 {
@@ -1237,11 +1237,11 @@ impl Context {
12371237 fn krate ( self , mut krate : clean:: Crate ) -> Result < ( ) , Error > {
12381238 let mut item = match krate. module . take ( ) {
12391239 Some ( i) => i,
1240- None => return Ok ( ( ) )
1240+ None => return Ok ( ( ) ) ,
12411241 } ;
12421242 item. name = Some ( krate. name ) ;
12431243
1244- // render the crate documentation
1244+ // Render the crate documentation
12451245 let mut work = vec ! [ ( self , item) ] ;
12461246
12471247 while let Some ( ( mut cx, item) ) = work. pop ( ) {
@@ -2987,7 +2987,7 @@ impl<'a> fmt::Display for Sidebar<'a> {
29872987 let it = self . item ;
29882988 let parentlen = cx. current . len ( ) - if it. is_mod ( ) { 1 } else { 0 } ;
29892989
2990- // the sidebar is designed to display sibling functions, modules and
2990+ // The sidebar is designed to display sibling functions, modules and
29912991 // other miscellaneous information. since there are lots of sibling
29922992 // items (and that causes quadratic growth in large modules),
29932993 // we refactor common parts into a shared JavaScript file per module.
@@ -3006,7 +3006,7 @@ impl<'a> fmt::Display for Sidebar<'a> {
30063006 }
30073007 write ! ( fmt, "</p>" ) ?;
30083008
3009- // sidebar refers to the enclosing module, not this module
3009+ // Sidebar refers to the enclosing module, not this module.
30103010 let relpath = if it. is_mod ( ) { "../" } else { "" } ;
30113011 write ! ( fmt,
30123012 "<script>window.sidebarCurrent = {{\
@@ -3018,7 +3018,7 @@ impl<'a> fmt::Display for Sidebar<'a> {
30183018 ty = it. type_( ) . css_class( ) ,
30193019 path = relpath) ?;
30203020 if parentlen == 0 {
3021- // there is no sidebar-items.js beyond the crate root path
3021+ // There is no sidebar-items.js beyond the crate root path
30223022 // FIXME maybe dynamic crate loading can be merged here
30233023 } else {
30243024 write ! ( fmt, "<script defer src=\" {path}sidebar-items.js\" ></script>" ,
0 commit comments