diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-03 12:27:10 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-03 12:27:10 +0100 |
commit | e644f64f2a68a14a841adb3f3e897d1fcb35f23f (patch) | |
tree | 09c4d8eff84a57c684f7a961bf948b38c14d3da3 /crates/test_utils/src | |
parent | c6b739bad0c0a458d3ae6bb2bc4514477f325e31 (diff) | |
parent | f06b2bcd91329fb795839a4eabd8f43aa472aeb2 (diff) |
Merge #4678
4678: Unsquish parameter types in tooltips for macro-generated functions r=aloucks a=aloucks
Note the missing whitespace between `:` and the parameter type.
Before:

After:

Co-authored-by: Aaron Loucks <[email protected]>
Diffstat (limited to 'crates/test_utils/src')
-rw-r--r-- | crates/test_utils/src/lib.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index 1bd97215c..2141bfc20 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -15,6 +15,7 @@ use std::{ | |||
15 | }; | 15 | }; |
16 | 16 | ||
17 | pub use ra_cfg::CfgOptions; | 17 | pub use ra_cfg::CfgOptions; |
18 | use stdx::split1; | ||
18 | 19 | ||
19 | pub use relative_path::{RelativePath, RelativePathBuf}; | 20 | pub use relative_path::{RelativePath, RelativePathBuf}; |
20 | pub use rustc_hash::FxHashMap; | 21 | pub use rustc_hash::FxHashMap; |
@@ -332,11 +333,6 @@ fn parse_meta(meta: &str) -> FixtureMeta { | |||
332 | FixtureMeta::File(FileMeta { path, crate_name: krate, deps, edition, cfg, env }) | 333 | FixtureMeta::File(FileMeta { path, crate_name: krate, deps, edition, cfg, env }) |
333 | } | 334 | } |
334 | 335 | ||
335 | fn split1(haystack: &str, delim: char) -> Option<(&str, &str)> { | ||
336 | let idx = haystack.find(delim)?; | ||
337 | Some((&haystack[..idx], &haystack[idx + delim.len_utf8()..])) | ||
338 | } | ||
339 | |||
340 | /// Adjusts the indentation of the first line to the minimum indentation of the rest of the lines. | 336 | /// Adjusts the indentation of the first line to the minimum indentation of the rest of the lines. |
341 | /// This allows fixtures to start off in a different indentation, e.g. to align the first line with | 337 | /// This allows fixtures to start off in a different indentation, e.g. to align the first line with |
342 | /// the other lines visually: | 338 | /// the other lines visually: |