aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand/src
diff options
context:
space:
mode:
authorLaurenČ›iu Nicola <[email protected]>2020-04-24 19:48:30 +0100
committerLaurenČ›iu Nicola <[email protected]>2020-04-25 10:19:23 +0100
commit58dde891f87bc6131b0ef34c33f6ffb9aa0c0ec3 (patch)
tree7cd3fc2771319eb78a3487c5f64e5f487e047698 /crates/ra_hir_expand/src
parent5d97667f8dd467e7382885fcae40bcdbac63ae4f (diff)
Avoid lossy OsString conversions
Diffstat (limited to 'crates/ra_hir_expand/src')
-rw-r--r--crates/ra_hir_expand/src/builtin_macro.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs
index 3da137f2e..493cda2c4 100644
--- a/crates/ra_hir_expand/src/builtin_macro.rs
+++ b/crates/ra_hir_expand/src/builtin_macro.rs
@@ -358,7 +358,7 @@ fn env_expand(
358 // However, we cannot use an empty string here, because for 358 // However, we cannot use an empty string here, because for
359 // `include!(concat!(env!("OUT_DIR"), "/foo.rs"))` will become 359 // `include!(concat!(env!("OUT_DIR"), "/foo.rs"))` will become
360 // `include!("foo.rs"), which might go to infinite loop 360 // `include!("foo.rs"), which might go to infinite loop
361 let s = get_env_inner(db, arg_id, &key).unwrap_or("__RA_UNIMPLEMENTATED__".to_string()); 361 let s = get_env_inner(db, arg_id, &key).unwrap_or_else(|| "__RA_UNIMPLEMENTATED__".to_string());
362 let expanded = quote! { #s }; 362 let expanded = quote! { #s };
363 363
364 Ok((expanded, FragmentKind::Expr)) 364 Ok((expanded, FragmentKind::Expr))