Skip to content

Commit 8071325

Browse files
load-cargo: Fix warnings about clippy str_to_string rule
1 parent ae78dca commit 8071325

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/load-cargo/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ pub fn load_proc_macro(
279279
let dylib = MacroDylib::new(path.to_path_buf());
280280
let vec = server.load_dylib(dylib).map_err(|e| format!("{e}"))?;
281281
if vec.is_empty() {
282-
return Err("proc macro library returned no proc macros".to_string());
282+
return Err("proc macro library returned no proc macros".to_owned());
283283
}
284284
Ok(vec
285285
.into_iter()
@@ -382,7 +382,7 @@ impl ProcMacroExpander for Expander {
382382
call_site: Span,
383383
mixed_site: Span,
384384
) -> Result<tt::Subtree<Span>, ProcMacroExpansionError> {
385-
let env = env.iter().map(|(k, v)| (k.to_string(), v.to_string())).collect();
385+
let env = env.iter().map(|(k, v)| (k.to_owned(), v.to_owned())).collect();
386386
match self.0.expand(subtree, attrs, env, def_site, call_site, mixed_site) {
387387
Ok(Ok(subtree)) => Ok(subtree),
388388
Ok(Err(err)) => Err(ProcMacroExpansionError::Panic(err.0)),

0 commit comments

Comments
 (0)