Skip to content

Commit

Permalink
Remove other mut
Browse files Browse the repository at this point in the history
  • Loading branch information
AZWN committed Nov 30, 2023
1 parent a4ac4d1 commit 7ffb087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scopegraphs-lib/src/resolve/topdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ where
env
}

fn resolve_data(&mut self, path: &Path<'sg, LABEL>) -> Env<'sg, LABEL, DATA> {
fn resolve_data(&self, path: &Path<'sg, LABEL>) -> Env<'sg, LABEL, DATA> {
let data = self.sg.borrow().get_data(path.target());
if (self.data_wellformedness)(data) {
Env::single(path.clone().resolve(data))

Check failure on line 176 in scopegraphs-lib/src/resolve/topdown.rs

View workflow job for this annotation

GitHub Actions / clippy

cannot return value referencing temporary value

error[E0515]: cannot return value referencing temporary value --> scopegraphs-lib/src/resolve/topdown.rs:176:13 | 174 | let data = self.sg.borrow().get_data(path.target()); | ---------------- temporary value created here 175 | if (self.data_wellformedness)(data) { 176 | Env::single(path.clone().resolve(data)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returns a value referencing data owned by the current function
Expand Down

0 comments on commit 7ffb087

Please sign in to comment.