aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/generate_enum_match_method.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add `find_impl_block_end` assist helperYoshua Wuyts2021-02-121-2/+39
|
* Add getter/setter assistsYoshua Wuyts2021-02-091-12/+2
| | | | | | | | | | | | | | | | Finish implementing `generate_setter` assists Make `generate_impl_text` util generic generate getter methods Fix getter / setter naming It's now in-line with the Rust API naming guidelines: https://rust-lang.github.io/api-guidelines/naming.html#getter-names-follow-rust-convention-c-getter apply clippy Improve examples
* AdtDef -> AdtAleksey Kladov2021-02-071-1/+1
|
* Merge #7572bors[bot]2021-02-051-14/+6
|\ | | | | | | | | | | | | | | | | | | | | | | 7572: Add `find_or_create_impl_block` to assist utils r=matklad a=yoshuawuyts This is another continuation of https://github.com/rust-analyzer/rust-analyzer/pull/7562, introducing a small util to either find an `impl` block, or create a new one if none exists. I copied this code from the `generate_new` assist into https://github.com/rust-analyzer/rust-analyzer/pull/7562, and this unifies both into a helper. It doesn't feel super polished in its current state, but my hope is that this is enough of a starting point that it can be expanded on later. For example something that would be useful would be a flag which either returns the index of the start of the block, or the end of the block. Anyway, I hope this is useful. Thanks! Co-authored-by: Yoshua Wuyts <[email protected]>
| * Add `find_or_create_impl_block` to assist utilsYoshua Wuyts2021-02-051-14/+6
| |
* | Add doc gen to the `generate_enum_match_method` assistYoshua Wuyts2021-02-051-1/+9
|/
* Move `find_struct_impl` to assist utilsYoshua Wuyts2021-02-051-90/+10
|
* add `generate-enum-match` assistYoshua Wuyts2021-02-051-0/+293