Do not include separator to post comment

This prevents the trailing `;` on use item to be treated as comment.
This commit is contained in:
Seiichi Uchida 2018-03-31 13:19:55 +09:00
parent a8022f3862
commit 2b682b8ed5

View File

@ -619,6 +619,8 @@ fn next(&mut self) -> Option<Self::Item> {
let post_snippet_trimmed = if post_snippet.starts_with(|c| c == ',' || c == ':') {
post_snippet[1..].trim_matches(white_space)
} else if post_snippet.starts_with(self.separator) {
post_snippet[self.separator.len()..].trim_matches(white_space)
} else if post_snippet.ends_with(',') {
post_snippet[..(post_snippet.len() - 1)].trim_matches(white_space)
} else {