pub fn to_string_lossy(&self) -> Cow<str> {
        // Ok so this is the end of the line for dancing around and acting
        // like we can just be fine with Linux OS strings being arbitrary bags
        // of bytes. We need some way to print this value in a reasonable way,
        // and the best precedent I can find for that is std::Path::display.
        // This wraps the a Path (which is just an OsStr) and provides a
        // Display impl.
        //
        // What does this Display impl do..?
        //
        // It just calls from_utf8_lossy.
        //
        // Whelp. Ok.
        //
        // (Strictly speaking it wraps it up in the internal/unstable
        // Utf8Lossy iterator so it avoids the allocation, but we don't
        // have that luxury, so we might as well make the allocation/conversion
        // explicit.)
        String::from_utf8_lossy(self.as_bytes())
    }
/// Converts to a utf8 string lossily (uses the usual std lossy algorithm).
Converts to a utf8 string lossily (uses the usual std lossy algorithm).
Converts to a utf8 string lossily ( uses the usual std lossy algorithm ) .
pub fn to_string_lossy(&self) -> Cow<str> {
        // Ok so this is the end of the line for dancing around and acting
        // like we can just be fine with Linux OS strings being arbitrary bags
        // of bytes. We need some way to print this value in a reasonable way,
        // and the best precedent I can find for that is std::Path::display.
        // This wraps the a Path (which is just an OsStr) and provides a
        // Display impl.
        //
        // What does this Display impl do..?
        //
        // It just calls from_utf8_lossy.
        //
        // Whelp. Ok.
        //
        // (Strictly speaking it wraps it up in the internal/unstable
        // Utf8Lossy iterator so it avoids the allocation, but we don't
        // have that luxury, so we might as well make the allocation/conversion
        // explicit.)
        String::from_utf8_lossy(self.as_bytes())
    }
pub fn to_string_lossy ( & self ) -> Cow < str > { // Ok so this is the end of the line for dancing around and acting // like we can just be fine with Linux OS strings being arbitrary bags // of bytes. We need some way to print this value in a reasonable way, // and the best precedent I can find for that is std::Path::display. // This wraps the a Path (which is just an OsStr) and provides a // Display impl. // // What does this Display impl do..? // // It just calls from_utf8_lossy. // // Whelp. Ok. // // (Strictly speaking it wraps it up in the internal/unstable // Utf8Lossy iterator so it avoids the allocation, but we don't // have that luxury, so we might as well make the allocation/conversion // explicit.) String :: from_utf8_lossy ( self . as_bytes ( ) ) }
Converts to a utf8 string lossily (uses the usual std lossy algorithm).
Converts to a utf8 string lossily ( uses the usual std lossy algorithm ) .
&self