Skip to content

Commit fbb1612

Browse files
committed
Windows line endings
1 parent abc0530 commit fbb1612

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/librustdoc/html/render.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ pub fn run(mut krate: clean::Crate,
608608
// A short, single-line view of `s`.
609609
fn concise_str(s: &str) -> String {
610610
if s.contains('\n') {
611-
return format!("{}...", &s[..s.find('\n').unwrap()]);
611+
return format!("{}...", s.lines().next().expect("Impossible! We just found a newline"));
612612
}
613613
if s.len() > 70 {
614614
return format!("{} ... {}", &s[..50], &s[s.len()-20..]);

0 commit comments

Comments
 (0)