From 56ca843695e0927dbe3dc28a15d108707ce9c3ba Mon Sep 17 00:00:00 2001 From: ivan770 Date: Fri, 12 Mar 2021 11:01:43 +0200 Subject: Shorten trim call --- crates/ide/src/file_structure.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates') 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 { if let Some(comment) = ast::Comment::cast(token) { let text = comment.text().trim(); - if let Some(region_name) = text.strip_prefix("// region:").map(|text| text.trim()) { + if let Some(region_name) = text.strip_prefix("// region:").map(str::trim) { return Some(StructureNode { parent: None, label: region_name.to_string(), -- cgit v1.2.3