Skip to content

Conversation

@harudagondi
Copy link
Contributor

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 harudagondi changed the title Feature: Add functionality to unwrap tuple declarations Feature: Add assist to unwrap tuple declarations Sep 17, 2022
@harudagondi harudagondi requested a review from Veykril September 25, 2022 04:27
@Veykril
Copy link
Member

Veykril commented Sep 26, 2022

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Sep 26, 2022

📌 Commit c2dc32c has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 26, 2022

⌛ Testing commit c2dc32c with merge 1a24003...

@bors
Copy link
Contributor

bors commented Sep 26, 2022

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 1a24003 to master...

@bors bors merged commit 1a24003 into rust-lang:master Sep 26, 2022
@lnicola
Copy link
Member

lnicola commented Oct 3, 2022

unwrap-tuple.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants