Skip to content

Commit c0af897

Browse files
committed
Fix tidy
1 parent 191e5b0 commit c0af897

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/librustc_resolve/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,8 @@ impl<'a> Resolver<'a> {
14401440
/// isn't something that can be returned because it can't be made to live that long,
14411441
/// and also it's a private type. Fortunately rustdoc doesn't need to know the error,
14421442
/// just that an error occured.
1443-
pub fn resolve_str_path_error(&mut self, span: Span, path_str: &str, is_value: bool) -> Result<hir::Path, ()> {
1443+
pub fn resolve_str_path_error(&mut self, span: Span, path_str: &str, is_value: bool)
1444+
-> Result<hir::Path, ()> {
14441445
use std::iter;
14451446
let mut errored = false;
14461447

src/librustdoc/clean/mod.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -834,8 +834,9 @@ impl Clean<Attributes> for [ast::Attribute] {
834834
let path = {
835835
let is_value;
836836
let path_str = if let Some(prefix) =
837-
["struct", "enum", "type", "trait", "union"].iter()
838-
.find(|p| link.starts_with(**p)) {
837+
["struct", "enum", "type",
838+
"trait", "union"].iter()
839+
.find(|p| link.starts_with(**p)) {
839840
is_value = Some(false);
840841
link.trim_left_matches(prefix).trim()
841842
} else if let Some(prefix) =
@@ -857,7 +858,8 @@ impl Clean<Attributes> for [ast::Attribute] {
857858
// avoid resolving things (i.e. regular links) which aren't like paths
858859
// FIXME(Manishearth) given that most links have slashes in them might be worth
859860
// doing a check for slashes first
860-
if path_str.contains(|ch: char| !(ch.is_alphanumeric() || ch == ':' || ch == '_')) {
861+
if path_str.contains(|ch: char| !(ch.is_alphanumeric() ||
862+
ch == ':' || ch == '_')) {
861863
continue;
862864
}
863865

@@ -867,7 +869,8 @@ impl Clean<Attributes> for [ast::Attribute] {
867869
if let Some(id) = cx.mod_ids.borrow().last() {
868870
cx.resolver.borrow_mut()
869871
.with_scope(*id, |resolver| {
870-
resolver.resolve_str_path_error(DUMMY_SP, &path_str, is_val)
872+
resolver.resolve_str_path_error(DUMMY_SP,
873+
&path_str, is_val)
871874
})
872875
} else {
873876
// FIXME(Manishearth) this branch doesn't seem to ever be hit, really

0 commit comments

Comments
 (0)