Skip to content

Commit

Permalink
Windows line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Sep 1, 2017
1 parent abc0530 commit fbb1612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ pub fn run(mut krate: clean::Crate,
// A short, single-line view of `s`.
fn concise_str(s: &str) -> String {
if s.contains('\n') {
return format!("{}...", &s[..s.find('\n').unwrap()]);
return format!("{}...", s.lines().next().expect("Impossible! We just found a newline"));
}
if s.len() > 70 {
return format!("{} ... {}", &s[..50], &s[s.len()-20..]);
Expand Down

0 comments on commit fbb1612

Please sign in to comment.