Returns the length of the indentation in bytes. # Panics If the indentation is longer than 4GB.
(self)
| 1732 | /// # Panics |
| 1733 | /// If the indentation is longer than 4GB. |
| 1734 | fn text_len(self) -> TextSize { |
| 1735 | let len = match self { |
| 1736 | Self::Spaces(count) => count, |
| 1737 | Self::Tabs(count) => count, |
| 1738 | Self::TabSpaces { tabs, spaces } => tabs + spaces, |
| 1739 | Self::SpacesTabs { spaces, tabs } => spaces + tabs, |
| 1740 | Self::Mixed { len, .. } => return len, |
| 1741 | }; |
| 1742 | |
| 1743 | TextSize::try_from(len).unwrap() |
| 1744 | } |
| 1745 | |
| 1746 | /// Trims the indent of `rhs` by `self`. |
| 1747 | /// |
no outgoing calls
no test coverage detected