aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-03-28 10:08:19 +0000
committerAleksey Kladov <[email protected]>2020-03-28 11:27:54 +0000
commit6596e7cddfc00281362c3640781f6cd6bc0b5614 (patch)
tree9a2b4f264e37dba87fa80d10ce5872090bcdbfef /crates/ra_hir_ty/src
parentb764c38436fcb9426eb7da3be4f5fbcd63b316f5 (diff)
Nice string formatting
Diffstat (limited to 'crates/ra_hir_ty/src')
-rw-r--r--crates/ra_hir_ty/src/test_db.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/ra_hir_ty/src/test_db.rs
index 5bbeabf51..208096aab 100644
--- a/crates/ra_hir_ty/src/test_db.rs
+++ b/crates/ra_hir_ty/src/test_db.rs
@@ -10,6 +10,7 @@ use hir_expand::{db::AstDatabase, diagnostics::DiagnosticSink};
10use ra_db::{ 10use ra_db::{
11 salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, SourceDatabase, Upcast, 11 salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, SourceDatabase, Upcast,
12}; 12};
13use stdx::format_to;
13 14
14use crate::{db::HirDatabase, expr::ExprValidator}; 15use crate::{db::HirDatabase, expr::ExprValidator};
15 16
@@ -131,7 +132,7 @@ impl TestDB {
131 for f in fns { 132 for f in fns {
132 let infer = self.infer(f.into()); 133 let infer = self.infer(f.into());
133 let mut sink = DiagnosticSink::new(|d| { 134 let mut sink = DiagnosticSink::new(|d| {
134 buf += &format!("{:?}: {}\n", d.syntax_node(self).text(), d.message()); 135 format_to!(buf, "{:?}: {}\n", d.syntax_node(self).text(), d.message());
135 }); 136 });
136 infer.add_diagnostics(self, f, &mut sink); 137 infer.add_diagnostics(self, f, &mut sink);
137 let mut validator = ExprValidator::new(f, infer, &mut sink); 138 let mut validator = ExprValidator::new(f, infer, &mut sink);