-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-assistsS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
First I want to say this project is absolutely awesome! I didn't know I needed those magic code actions and now I can't live without them ❤️. And it's so fast at spotting my missing semicolons 🤯.
A thing I regularly end up doing when refactoring code is inlining a function that I am in the process of modifying. I'd love a code action that can be triggered on the call site of a function and inlines it at that call site. Might also delete the function if that was the only call site.
fn foo(s: &str, n: u64) {
println!("A string {}, a squared number {}", s, n*n)
}
fn main() {
foo|("a string", 1+1)
}===>
fn main() {
let n = 1+1; // `n` is a variable here because it's used more than once.
println!("A string {}, a squared number {}, "a string", n*n)
}Metadata
Metadata
Assignees
Labels
A-assistsS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now