aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-05-31 14:25:51 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2022-05-31 14:30:11 +0200
commit573b6298596fae8708982c65db0b66b989299805 (patch)
tree509a601bca29a64e866dbd3a66bbc3c059b90504 /gcc/rust
parent9a1ae92194805c055c7b5c7b3b7b26c3b2da8365 (diff)
downloadgcc-573b6298596fae8708982c65db0b66b989299805.zip
gcc-573b6298596fae8708982c65db0b66b989299805.tar.gz
gcc-573b6298596fae8708982c65db0b66b989299805.tar.bz2
ast: Indent: Improve indent formatting performance
Co-authored-by: ndrwnaguib <ndrwnaguib@gmail.com>
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/ast/rust-ast-dump.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index 1afb988..64966c9 100644
--- a/gcc/rust/ast/rust-ast-dump.cc
+++ b/gcc/rust/ast/rust-ast-dump.cc
@@ -26,10 +26,7 @@ Indent::Indent () : tabs (0) {}
std::ostream &
operator<< (std::ostream &stream, const Indent &indent)
{
- for (size_t i = 0; i < indent.tabs; i++)
- stream << '\t';
-
- return stream;
+ return stream << std::string (indent.tabs, '\t');
}
void