mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Minor refactoring
- use `str::parse()` rather than `FromStr::from_str()` - use `iter::once()` instead of constructing `Vec` for a single element
This commit is contained in:
parent
b64e5b3919
commit
10b5fd1431
2 changed files with 12 additions and 11 deletions
|
@ -65,7 +65,7 @@ pub mod token_id {
|
|||
}
|
||||
impl TokenTree {
|
||||
pub const fn empty() -> Self {
|
||||
Self::Subtree(Subtree { delimiter: Delimiter::unspecified(), token_trees: vec![] })
|
||||
Self::Subtree(Subtree::empty())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue