As a general rule, if the edit materially alters the content of the post, it should be rejected. With code, an edit, even one that only changes a couple characters, is presumed to be a material modification. Exceptions would be correcting obvious spelling errors or removing unnecessary white space- though I generally will skip edits of this nature if I'm not familiar with the language.
When editing explanatory text, there is generally a bit more wiggle room. Some users are overly-verbose in their explanations, and it can sometimes be possible to remove whole sentences without removing any actual content of the post. These edits are good, because they make the overall post easier to read and extract meaning from. Other times, content can be added or removed based in discussion that occurs in the comments, but which has not otherwise been applied to the post in question. I usually approve these edits as well, though it helps when the editor makes a comment explainin where they came up with the change.
To summarize, if the edit makes no material modification to the post content, or if it was clearly sanctioned by the original author by way of comments, it gets approved. Otherwise, it gets rejected and the editor is advised to write a comment instead.