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
toggle_multiline() breaks casting in Rust #41
Comments
Notably, https://github.com/Wansmer/treesj/ handles it fine. |
Could you post the correct before/after (and maybe a couple other test cases) so I can build a spec? I don't actually use rust :) |
Hey, I have mentioned the correct way it should be formatted in my previous comment, but I'll try and find more examples tomorrow. |
Found another issue, something like fn test() {
let foo = stuff();
}```
gets collapsed into
```rust
fn test() { letfoo = stuff(); } it is mostly right, but |
In addition, mutable borrows are also incorrectly collapsed, The common part of all the problems seems to be that tokens separated by whitespaces are merged together, maybe some sort of system needs to be in place to ensure that certain tokens are separated by whitespaces after collapsing. Again mentioning treesj, all the above situations are handled by treesj just fine, just mentioning it because it might help as a reference. |
Before:
After:
The text was updated successfully, but these errors were encountered: