rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Feature: Add assist to unwrap tuple declarations

Open harudagondi opened this issue 3 years ago • 0 comments

Implement #12923 for only tuples.

Does not implement unwrapping for structs, as mentioned in the issue.

Add assist to unwrap tuples declarations to separate declarations.

fn main() {
	$0let (foo, bar, baz) = (1.0, "example", String::new())
}

becomes:

fn main() {
	let foo = 1.0;
	let bar = "example";
	let baz = String::new();
}

Changelog

Feature

  • Added assist to unwrap tuple declarations.

harudagondi avatar Sep 17 '22 08:09 harudagondi