Skip to content

Commit

Permalink
Eliminate line break in middle of panic message from PR 970
Browse files Browse the repository at this point in the history
This makes the complete error message more easily greppable.
  • Loading branch information
dtolnay committed Mar 5, 2021
1 parent 2b0c9bd commit f6460f4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/punctuated.rs
Expand Up @@ -164,8 +164,7 @@ impl<T, P> Punctuated<T, P> {
pub fn push_value(&mut self, value: T) {
assert!(
self.empty_or_trailing(),
"Punctuated::push_value: Punctuated is not empty or \
does not have a trailing punctuation",
"Punctuated::push_value: Punctuated is not empty or does not have a trailing punctuation",
);

self.last = Some(Box::new(value));
Expand Down Expand Up @@ -467,8 +466,7 @@ impl<T, P> Extend<Pair<T, P>> for Punctuated<T, P> {
fn extend<I: IntoIterator<Item = Pair<T, P>>>(&mut self, i: I) {
assert!(
self.empty_or_trailing(),
"Punctuated::extend: Punctuated is not empty or \
does not have a trailing punctuation",
"Punctuated::extend: Punctuated is not empty or does not have a trailing punctuation",
);

let mut nomore = false;
Expand Down

0 comments on commit f6460f4

Please sign in to comment.