Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract variable does not insert _ for first arg when extracting from a pipe #4134

Closed
keroami opened this issue Jan 1, 2025 · 2 comments · Fixed by #4184
Closed

extract variable does not insert _ for first arg when extracting from a pipe #4134

keroami opened this issue Jan 1, 2025 · 2 comments · Fixed by #4184
Labels
bug Something isn't working help wanted Contributions encouraged priority:medium

Comments

@keroami
Copy link

keroami commented Jan 1, 2025

dict.get(d, key)
|> result.unwrap(0)

on the unwrap yields

  let value = result.unwrap(0)
  dict.get(d, key)
  |> value

which does not compile. Should be value = result.unwrap(_, 0).

@keroami keroami added the bug Something isn't working label Jan 1, 2025
@lpil
Copy link
Member

lpil commented Jan 2, 2025

I'm surprised extraction works there at all! Should it?

@lpil lpil added help wanted Contributions encouraged discussion The approach has not yet been decided priority:medium labels Jan 2, 2025
@giacomocavalieri
Copy link
Member

Yeah I agree, I don't think it should extract the whole pipe steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Contributions encouraged priority:medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants