mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
Windows line endings
This commit is contained in:
parent
abc0530279
commit
fbb1612846
@ -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..]);
|
||||
|
Loading…
Reference in New Issue
Block a user