Skip to content

Commit

Permalink
chore: add todo comment
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit committed Nov 17, 2023
1 parent 048b041 commit ed190fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions y-octo/src/doc/codec/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ impl Content {
match self {
Self::Deleted(len) => *len,
Self::Json(strings) => strings.len() as u64,
// TODO: need a custom wrapper with length cached, this cost too much
Self::String(string) => string.chars().map(|c| c.len_utf16()).sum::<usize>() as u64,
Self::Any(any) => any.len() as u64,
Self::Binary(_) | Self::Embed(_) | Self::Format { .. } | Self::Type(_) | Self::Doc { .. } => 1,
Expand Down

0 comments on commit ed190fd

Please sign in to comment.