mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 07:37:30 +00:00
Shorten trim call
This commit is contained in:
parent
71a97a2d8c
commit
56ca843695
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ fn structure_token(token: SyntaxToken) -> Option<StructureNode> {
|
|||
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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue