Skip to content

Commit e411614

Browse files
Fix clippy (#3888)
<!-- Reference any GitHub issues resolved by this PR --> Closes # ## Introduced changes <!-- A brief description of the changes --> - ## Checklist <!-- Make sure all of these are complete --> - [ ] Linked relevant issue - [ ] Updated relevant documentation - [ ] Added relevant tests - [ ] Performed self-review of the code - [ ] Added changes to `CHANGELOG.md`
1 parent 3efb8e9 commit e411614

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

crates/data-transformer/src/transformer/sierra_abi/parsing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub fn parse_inline_macro(
8484
let node_text = token_tree
8585
.tokens(db)
8686
.elements(db)
87-
.map(|token| token.as_syntax_node().get_text(db).to_string())
87+
.map(|token| token.as_syntax_node().get_text(db).clone())
8888
.collect::<String>();
8989
split_expressions(&node_text, db)
9090
}

crates/debugging/src/tree/ui/display.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ impl NodeDisplay for TestName {
3131
impl NodeDisplay for ContractName {
3232
const TAG: &'static str = "contract name";
3333
fn string_pretty(&self) -> String {
34-
self.0.to_string()
34+
self.0.clone()
3535
}
3636
}
3737

3838
impl NodeDisplay for Selector {
3939
const TAG: &'static str = "selector";
4040
fn string_pretty(&self) -> String {
41-
self.0.to_string()
41+
self.0.clone()
4242
}
4343
}
4444

crates/scarb-api/src/artifacts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl StarknetArtifactsFiles {
9797
.into_par_iter()
9898
.map(|(name, path)| {
9999
self.compile_artifact_at_path(&path)
100-
.map(|artifact| (name.to_string(), (artifact, path)))
100+
.map(|artifact| (name.clone(), (artifact, path)))
101101
})
102102
.collect::<Result<_>>()
103103
}
@@ -141,7 +141,7 @@ fn unique_artifacts(
141141
artifact_representations
142142
.into_iter()
143143
.flat_map(StarknetArtifactsRepresentation::artifacts)
144-
.unique_by(|(name, _)| name.to_string())
144+
.unique_by(|(name, _)| name.clone())
145145
.filter(|(name, _)| !current_artifacts.contains_key(name))
146146
.collect()
147147
}

0 commit comments

Comments
 (0)