Skip to content

Commit 73689aa

Browse files
ndmitchellfacebook-github-bot
authored andcommitted
Remove redundant dereferences
Summary: Clippy said that were redundant. Reviewed By: JakobDegen Differential Revision: D47226541 fbshipit-source-id: 5e1cdc0badc8f4d027942660e2a26a58cc08ba52
1 parent ed9a6f4 commit 73689aa

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

starlark/src/eval/compiler/def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl Compiler<'_, '_, '_> {
417417

418418
self.enter_scope(scope_id);
419419

420-
let docstring = DocString::extract_raw_starlark_docstring(&suite);
420+
let docstring = DocString::extract_raw_starlark_docstring(suite);
421421
let body = self.stmt(suite, false);
422422
let scope_id = self.exit_scope();
423423
let scope_names = self.scope_data.get_scope(scope_id);

starlark/src/eval/compiler/module.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ impl<'v> Compiler<'v, '_, '_> {
6868
self.eval,
6969
));
7070
}
71-
Some(loader) => expr_throw(loader.load(&name), span, self.eval)?,
71+
Some(loader) => expr_throw(loader.load(name), span, self.eval)?,
7272
};
7373

7474
for (our_name, their_name) in &load.node.args {
75-
let (slot, _captured) = self.scope_data.get_assign_ident_slot(&our_name);
75+
let (slot, _captured) = self.scope_data.get_assign_ident_slot(our_name);
7676
let slot = match slot {
7777
Slot::Local(..) => unreachable!("symbol need to be resolved to module"),
7878
Slot::Module(slot) => slot,

starlark/src/eval/compiler/stmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ impl Compiler<'_, '_, '_> {
471471
})
472472
}
473473
AssignP::Identifier(ident) => {
474-
let (slot, captured) = self.scope_data.get_assign_ident_slot(&ident);
474+
let (slot, captured) = self.scope_data.get_assign_ident_slot(ident);
475475
match (slot, captured) {
476476
(Slot::Local(slot), Captured::No) => {
477477
let lhs = IrSpanned {

0 commit comments

Comments
 (0)