@@ -874,12 +874,12 @@ fn extern_location(e: &clean::ExternalCrate, dst: &Path) -> ExternalLocation {
874
874
impl < ' a > DocFolder for SourceCollector < ' a > {
875
875
fn fold_item ( & mut self , item : clean:: Item ) -> Option < clean:: Item > {
876
876
// 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.
878
878
if self . scx . include_sources
879
879
// skip all invalid spans
880
880
&& 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.
883
883
&& !( item. source . filename . starts_with ( "<" )
884
884
&& item. source . filename . ends_with ( "macros>" ) ) {
885
885
@@ -974,13 +974,13 @@ impl DocFolder for Cache {
974
974
} ;
975
975
976
976
// Register any generics to their corresponding string. This is used
977
- // when pretty-printing types
977
+ // when pretty-printing types.
978
978
if let Some ( generics) = item. inner . generics ( ) {
979
979
self . generics ( generics) ;
980
980
}
981
981
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.
984
984
if let clean:: TraitItem ( ref t) = item. inner {
985
985
self . traits . entry ( item. def_id ) . or_insert_with ( || t. clone ( ) ) ;
986
986
}
@@ -996,7 +996,7 @@ impl DocFolder for Cache {
996
996
}
997
997
}
998
998
999
- // Index this method for searching later on
999
+ // Index this method for searching later on.
1000
1000
if let Some ( ref s) = item. name {
1001
1001
let ( parent, is_inherent_impl_item) = match item. inner {
1002
1002
clean:: StrippedItem ( ..) => ( ( None , None ) , false ) ,
@@ -1097,8 +1097,8 @@ impl DocFolder for Cache {
1097
1097
( self . stack . clone ( ) , item. type_ ( ) ) ) ;
1098
1098
}
1099
1099
}
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.
1102
1102
clean:: VariantItem ( ..) if !self . stripped_mod => {
1103
1103
let mut stack = self . stack . clone ( ) ;
1104
1104
stack. pop ( ) ;
@@ -1144,8 +1144,8 @@ impl DocFolder for Cache {
1144
1144
_ => false
1145
1145
} ;
1146
1146
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.
1149
1149
let ret = self . fold_item_recur ( item) . and_then ( |item| {
1150
1150
if let clean:: Item { inner : clean:: ImplItem ( _) , .. } = item {
1151
1151
// Figure out the id of this impl. This may map to a
@@ -1206,7 +1206,7 @@ impl Context {
1206
1206
}
1207
1207
1208
1208
/// 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).
1210
1210
fn recurse < T , F > ( & mut self , s : String , f : F ) -> T where
1211
1211
F : FnOnce ( & mut Context ) -> T ,
1212
1212
{
@@ -1237,11 +1237,11 @@ impl Context {
1237
1237
fn krate ( self , mut krate : clean:: Crate ) -> Result < ( ) , Error > {
1238
1238
let mut item = match krate. module . take ( ) {
1239
1239
Some ( i) => i,
1240
- None => return Ok ( ( ) )
1240
+ None => return Ok ( ( ) ) ,
1241
1241
} ;
1242
1242
item. name = Some ( krate. name ) ;
1243
1243
1244
- // render the crate documentation
1244
+ // Render the crate documentation
1245
1245
let mut work = vec ! [ ( self , item) ] ;
1246
1246
1247
1247
while let Some ( ( mut cx, item) ) = work. pop ( ) {
@@ -2987,7 +2987,7 @@ impl<'a> fmt::Display for Sidebar<'a> {
2987
2987
let it = self . item ;
2988
2988
let parentlen = cx. current . len ( ) - if it. is_mod ( ) { 1 } else { 0 } ;
2989
2989
2990
- // the sidebar is designed to display sibling functions, modules and
2990
+ // The sidebar is designed to display sibling functions, modules and
2991
2991
// other miscellaneous information. since there are lots of sibling
2992
2992
// items (and that causes quadratic growth in large modules),
2993
2993
// we refactor common parts into a shared JavaScript file per module.
@@ -3006,7 +3006,7 @@ impl<'a> fmt::Display for Sidebar<'a> {
3006
3006
}
3007
3007
write ! ( fmt, "</p>" ) ?;
3008
3008
3009
- // sidebar refers to the enclosing module, not this module
3009
+ // Sidebar refers to the enclosing module, not this module.
3010
3010
let relpath = if it. is_mod ( ) { "../" } else { "" } ;
3011
3011
write ! ( fmt,
3012
3012
"<script>window.sidebarCurrent = {{\
@@ -3018,7 +3018,7 @@ impl<'a> fmt::Display for Sidebar<'a> {
3018
3018
ty = it. type_( ) . css_class( ) ,
3019
3019
path = relpath) ?;
3020
3020
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
3022
3022
// FIXME maybe dynamic crate loading can be merged here
3023
3023
} else {
3024
3024
write ! ( fmt, "<script defer src=\" {path}sidebar-items.js\" ></script>" ,
0 commit comments