Skip to content

Commit 1fe87df

Browse files
committed
Fix tidy check errors
1 parent 1932d7a commit 1fe87df

File tree

4 files changed

+45
-10
lines changed

4 files changed

+45
-10
lines changed

src/librustdoc/clean/auto_trait.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,10 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
220220
}
221221
}
222222

223-
fn get_lifetime(&self, region: Region<'_>, names_map: &FxHashMap<String, Lifetime>) -> Lifetime {
223+
fn get_lifetime(
224+
&self, region: Region<'_>,
225+
names_map: &FxHashMap<String, Lifetime>
226+
) -> Lifetime {
224227
self.region_name(region)
225228
.map(|name| {
226229
names_map.get(&name).unwrap_or_else(|| {

src/librustdoc/clean/inline.rs

+11-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ use super::Clean;
3535
///
3636
/// The returned value is `None` if the definition could not be inlined,
3737
/// and `Some` of a vector of items if it was successfully expanded.
38-
pub fn try_inline(cx: &DocContext<'_, '_, '_>, def: Def, name: ast::Name, visited: &mut FxHashSet<DefId>)
38+
pub fn try_inline(
39+
cx: &DocContext<'_, '_, '_>,
40+
def: Def,
41+
name: ast::Name,
42+
visited: &mut FxHashSet<DefId>
43+
)
3944
-> Option<Vec<clean::Item>> {
4045
let did = if let Some(did) = def.opt_def_id() {
4146
did
@@ -387,7 +392,11 @@ pub fn build_impl(cx: &DocContext<'_, '_, '_>, did: DefId, ret: &mut Vec<clean::
387392
});
388393
}
389394

390-
fn build_module(cx: &DocContext<'_, '_, '_>, did: DefId, visited: &mut FxHashSet<DefId>) -> clean::Module {
395+
fn build_module(
396+
cx: &DocContext<'_, '_, '_>,
397+
did: DefId,
398+
visited: &mut FxHashSet<DefId>
399+
) -> clean::Module {
391400
let mut items = Vec::new();
392401
fill_in(cx, did, &mut items, visited);
393402
return clean::Module {

src/librustdoc/clean/mod.rs

+23-5
Original file line numberDiff line numberDiff line change
@@ -3523,23 +3523,37 @@ pub struct Impl {
35233523
pub blanket_impl: Option<Type>,
35243524
}
35253525

3526-
pub fn get_auto_traits_with_node_id(cx: &DocContext<'_, '_, '_>, id: ast::NodeId, name: String) -> Vec<Item> {
3526+
pub fn get_auto_traits_with_node_id(
3527+
cx: &DocContext<'_, '_, '_>,
3528+
id: ast::NodeId,
3529+
name: String
3530+
) -> Vec<Item> {
35273531
let finder = AutoTraitFinder::new(cx);
35283532
finder.get_with_node_id(id, name)
35293533
}
35303534

3531-
pub fn get_auto_traits_with_def_id(cx: &DocContext<'_, '_, '_>, id: DefId) -> Vec<Item> {
3535+
pub fn get_auto_traits_with_def_id(
3536+
cx: &DocContext<'_, '_, '_>,
3537+
id: DefId
3538+
) -> Vec<Item> {
35323539
let finder = AutoTraitFinder::new(cx);
35333540

35343541
finder.get_with_def_id(id)
35353542
}
35363543

3537-
pub fn get_blanket_impls_with_node_id(cx: &DocContext<'_, '_, '_>, id: ast::NodeId, name: String) -> Vec<Item> {
3544+
pub fn get_blanket_impls_with_node_id(
3545+
cx: &DocContext<'_, '_, '_>,
3546+
id: ast::NodeId,
3547+
name: String
3548+
) -> Vec<Item> {
35383549
let finder = BlanketImplFinder::new(cx);
35393550
finder.get_with_node_id(id, name)
35403551
}
35413552

3542-
pub fn get_blanket_impls_with_def_id(cx: &DocContext<'_, '_, '_>, id: DefId) -> Vec<Item> {
3553+
pub fn get_blanket_impls_with_def_id(
3554+
cx: &DocContext<'_, '_, '_>,
3555+
id: DefId
3556+
) -> Vec<Item> {
35433557
let finder = BlanketImplFinder::new(cx);
35443558

35453559
finder.get_with_def_id(id)
@@ -4095,7 +4109,11 @@ impl Clean<TypeBinding> for hir::TypeBinding {
40954109
}
40964110
}
40974111

4098-
pub fn def_id_to_path(cx: &DocContext<'_, '_, '_>, did: DefId, name: Option<String>) -> Vec<String> {
4112+
pub fn def_id_to_path(
4113+
cx: &DocContext<'_, '_, '_>,
4114+
did: DefId,
4115+
name: Option<String>
4116+
) -> Vec<String> {
40994117
let crate_name = name.unwrap_or_else(|| cx.tcx.crate_name(did.krate).to_string());
41004118
let relative = cx.tcx.def_path(did).data.into_iter().filter_map(|elem| {
41014119
// extern blocks have an empty name

src/librustdoc/html/render.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -2541,8 +2541,13 @@ fn render_markdown(w: &mut fmt::Formatter<'_>,
25412541
cx.codes))
25422542
}
25432543

2544-
fn document_short(w: &mut fmt::Formatter<'_>, cx: &Context, item: &clean::Item, link: AssocItemLink<'_>,
2545-
prefix: &str, is_hidden: bool) -> fmt::Result {
2544+
fn document_short(
2545+
w: &mut fmt::Formatter<'_>,
2546+
cx: &Context,
2547+
item: &clean::Item,
2548+
link: AssocItemLink<'_>,
2549+
prefix: &str, is_hidden: bool
2550+
) -> fmt::Result {
25462551
if let Some(s) = item.doc_value() {
25472552
let markdown = if s.contains('\n') {
25482553
format!("{} [Read more]({})",

0 commit comments

Comments
 (0)