summaryrefslogtreecommitdiffstats
path: root/src/window/icon.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/window/icon.rs')
-rw-r--r--src/window/icon.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/window/icon.rs b/src/window/icon.rs
index 287538b1..aacadfca 100644
--- a/src/window/icon.rs
+++ b/src/window/icon.rs
@@ -3,18 +3,11 @@ use std::fmt;
use std::io;
/// The icon of a window.
-#[cfg(not(target_arch = "wasm32"))]
#[derive(Debug, Clone)]
pub struct Icon(iced_winit::winit::window::Icon);
-/// The icon of a window.
-#[cfg(target_arch = "wasm32")]
-#[derive(Debug, Clone)]
-pub struct Icon;
-
impl Icon {
/// Creates an icon from 32bpp RGBA data.
- #[cfg(not(target_arch = "wasm32"))]
pub fn from_rgba(
rgba: Vec<u8>,
width: u32,
@@ -25,16 +18,6 @@ impl Icon {
Ok(Icon(raw))
}
-
- /// Creates an icon from 32bpp RGBA data.
- #[cfg(target_arch = "wasm32")]
- pub fn from_rgba(
- _rgba: Vec<u8>,
- _width: u32,
- _height: u32,
- ) -> Result<Self, Error> {
- Ok(Icon)
- }
}
/// An error produced when using `Icon::from_rgba` with invalid arguments.
@@ -62,7 +45,6 @@ pub enum Error {
OsError(io::Error),
}
-#[cfg(not(target_arch = "wasm32"))]
impl From<iced_winit::winit::window::BadIcon> for Error {
fn from(error: iced_winit::winit::window::BadIcon) -> Self {
use iced_winit::winit::window::BadIcon;
@@ -86,7 +68,6 @@ impl From<iced_winit::winit::window::BadIcon> for Error {
}
}
-#[cfg(not(target_arch = "wasm32"))]
impl From<Icon> for iced_winit::winit::window::Icon {
fn from(icon: Icon) -> Self {
icon.0