diff options
author | ivan770 <[email protected]> | 2021-03-12 09:01:43 +0000 |
---|---|---|
committer | ivan770 <[email protected]> | 2021-03-14 16:53:40 +0000 |
commit | 56ca843695e0927dbe3dc28a15d108707ce9c3ba (patch) | |
tree | 079fb7d255c8fec4512b5f12686a2b752962c41c /crates/ide/src | |
parent | 71a97a2d8c30fc4061a545f1e2db10e3559eae36 (diff) |
Shorten trim call
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/file_structure.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/file_structure.rs b/crates/ide/src/file_structure.rs index 713c76957..33d3c5323 100644 --- a/crates/ide/src/file_structure.rs +++ b/crates/ide/src/file_structure.rs | |||
@@ -176,7 +176,7 @@ fn structure_token(token: SyntaxToken) -> Option<StructureNode> { | |||
176 | if let Some(comment) = ast::Comment::cast(token) { | 176 | if let Some(comment) = ast::Comment::cast(token) { |
177 | let text = comment.text().trim(); | 177 | let text = comment.text().trim(); |
178 | 178 | ||
179 | if let Some(region_name) = text.strip_prefix("// region:").map(|text| text.trim()) { | 179 | if let Some(region_name) = text.strip_prefix("// region:").map(str::trim) { |
180 | return Some(StructureNode { | 180 | return Some(StructureNode { |
181 | parent: None, | 181 | parent: None, |
182 | label: region_name.to_string(), | 182 | label: region_name.to_string(), |