pub fn trim_end(self, amount: impl IntoByteIndex) -> Self {
        let amount = amount.into_byte_index();

        Self {
            start: self.start,
            end: ByteIndex::max(self.end.saturating_sub(amount), self.start),
        }
    }
/// Trim the end of the span by the given amount.
Trim the end of the span by the given amount.
Trim the end of the span by the given amount .
pub fn trim_end(self, amount: impl IntoByteIndex) -> Self {
        let amount = amount.into_byte_index();
        Self {
            start: self.start,
            end: ByteIndex::max(self.end.saturating_sub(amount), self.start),
        }
    }
pub fn trim_end ( self , amount : impl IntoByteIndex ) -> Self { let amount = amount . into_byte_index ( ) ; Self { start : self . start , end : ByteIndex :: max ( self . end . saturating_sub ( amount ) , self . start ) , } }
Trim the end of the span by the given amount.
Trim the end of the span by the given amount .
self
amount
impl IntoByteIndex
self
amount
impl IntoByteIndex