diff options
| author | Daniel Eades <danieleades@hotmail.com> | 2022-12-30 08:45:08 +0000 |
|---|---|---|
| committer | Daniel Eades <danieleades@hotmail.com> | 2023-01-02 15:02:54 +0000 |
| commit | 8615bba1054395891a6d881623b89ff5ee6ed5bd (patch) | |
| tree | 2c546bb4f6b973bd54e70e61b91a906b6f3cd6a2 | |
| parent | efd2c20e96bfcd2b988dd261f882d1405fc2361d (diff) | |
use 'unwrap_or_default'
| -rw-r--r-- | crates/hir-expand/src/builtin_fn_macro.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir-expand/src/builtin_fn_macro.rs b/crates/hir-expand/src/builtin_fn_macro.rs index 985954d44e4..e5f1a5ebb20 100644 --- a/crates/hir-expand/src/builtin_fn_macro.rs +++ b/crates/hir-expand/src/builtin_fn_macro.rs @@ -449,7 +449,7 @@ fn concat_bytes_expand( match token.kind() { syntax::SyntaxKind::BYTE => bytes.push(token.text().to_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())); } _ => { |
