Move indent call to correct spot

This commit is contained in:
Joshua Warner 2024-12-14 22:11:00 -08:00
parent 11d8dd1335
commit 1b4f5bbb52
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
7 changed files with 68 additions and 12 deletions

View file

@ -95,11 +95,7 @@ impl<'a> Buf<'a> {
#[track_caller]
pub fn push_str_allow_spaces(&mut self, s: &str) {
debug_assert!(
!self.beginning_of_line,
"push_str: `{s}` with text:\n{}",
self.text
);
debug_assert!(!self.beginning_of_line, "push_str: `{s}`");
self.flush_spaces();
@ -108,11 +104,7 @@ impl<'a> Buf<'a> {
#[track_caller]
pub fn push_str(&mut self, s: &str) {
debug_assert!(
!self.beginning_of_line,
"push_str: `{s}` with text:\n{}",
self.text
);
debug_assert!(!self.beginning_of_line, "push_str: `{s}`");
debug_assert!(!s.contains('\n'));
debug_assert!(!s.ends_with(' '));