mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 22:54:00 +00:00
use 'unwrap_or_default'
This commit is contained in:
parent
efd2c20e96
commit
8615bba105
1 changed files with 1 additions and 1 deletions
|
@ -449,7 +449,7 @@ fn concat_bytes_expand(
|
||||||
match token.kind() {
|
match token.kind() {
|
||||||
syntax::SyntaxKind::BYTE => bytes.push(token.text().to_string()),
|
syntax::SyntaxKind::BYTE => bytes.push(token.text().to_string()),
|
||||||
syntax::SyntaxKind::BYTE_STRING => {
|
syntax::SyntaxKind::BYTE_STRING => {
|
||||||
let components = unquote_byte_string(lit).unwrap_or_else(Vec::new);
|
let components = unquote_byte_string(lit).unwrap_or_default();
|
||||||
components.into_iter().for_each(|x| bytes.push(x.to_string()));
|
components.into_iter().for_each(|x| bytes.push(x.to_string()));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|
Loading…
Reference in a new issue