Revert dependency updates in #9836 (#10089)

Due to: https://github.com/zed-industries/zed/issues/9985 and an
abundance of caution, I'm reverting the image and svg rendering updates
for now until we can debug the issue. cc: @niklaswimmer

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-04-02 11:27:48 -07:00 committed by GitHub
parent 6121bfc5a4
commit 55c897d993
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 267 additions and 496 deletions

View file

@ -330,7 +330,7 @@ impl Asset for Image {
};
let data = if let Ok(format) = image::guess_format(&bytes) {
let data = image::load_from_memory_with_format(&bytes, format)?.into_rgba8();
let data = image::load_from_memory_with_format(&bytes, format)?.into_bgra8();
ImageData::new(data)
} else {
let pixmap =
@ -369,7 +369,7 @@ pub enum ImageCacheError {
Image(Arc<ImageError>),
/// An error that occurred while processing an SVG.
#[error("svg error: {0}")]
Usvg(Arc<resvg::usvg::Error>),
Usvg(Arc<usvg::Error>),
}
impl From<std::io::Error> for ImageCacheError {
@ -384,8 +384,8 @@ impl From<ImageError> for ImageCacheError {
}
}
impl From<resvg::usvg::Error> for ImageCacheError {
fn from(error: resvg::usvg::Error) -> Self {
impl From<usvg::Error> for ImageCacheError {
fn from(error: usvg::Error) -> Self {
Self::Usvg(Arc::new(error))
}
}