aboutsummaryrefslogtreecommitdiff
path: root/mingling_cli/src/diagnostic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_cli/src/diagnostic.rs')
-rw-r--r--mingling_cli/src/diagnostic.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/mingling_cli/src/diagnostic.rs b/mingling_cli/src/diagnostic.rs
index 527e879..807cdf3 100644
--- a/mingling_cli/src/diagnostic.rs
+++ b/mingling_cli/src/diagnostic.rs
@@ -26,7 +26,7 @@ fn cargo_level_to_annotate(
}
}
-/// 把 1-based char offset 转成 0-based byte offset
+/// Convert 1-based char offset to 0-based byte offset
fn char_offset_to_byte_offset(s: &str, char_offset: usize) -> usize {
s.char_indices()
.nth(char_offset.saturating_sub(1))