Shorten trim call
This commit is contained in:
parent
71a97a2d8c
commit
56ca843695
@ -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…
Reference in New Issue
Block a user