summaryrefslogtreecommitdiffstats
path: root/src/window/icon.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-11 17:28:51 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-11 17:28:51 +0200
commitcf434236e7e15e0fa05e5915b8d4d78dcaf1b7e8 (patch)
tree27d32b10298698c30a5a5abb55e3ce8a143bd184 /src/window/icon.rs
parent3220d472ac7ab2d11d6fc61d50bcbf9de91e1def (diff)
downloadiced-cf434236e7e15e0fa05e5915b8d4d78dcaf1b7e8.tar.gz
iced-cf434236e7e15e0fa05e5915b8d4d78dcaf1b7e8.tar.bz2
iced-cf434236e7e15e0fa05e5915b8d4d78dcaf1b7e8.zip
Enable `doc_auto_cfg` when generating documentation
Diffstat (limited to 'src/window/icon.rs')
-rw-r--r--src/window/icon.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/window/icon.rs b/src/window/icon.rs
index b67b2ea3..0fe010ca 100644
--- a/src/window/icon.rs
+++ b/src/window/icon.rs
@@ -12,7 +12,6 @@ use std::path::Path;
///
/// This will return an error in case the file is missing at run-time. You may prefer [`Self::from_file_data`] instead.
#[cfg(feature = "image")]
-#[cfg_attr(docsrs, doc(cfg(feature = "image")))]
pub fn from_file<P: AsRef<Path>>(icon_path: P) -> Result<Icon, Error> {
let icon = image_rs::io::Reader::open(icon_path)?.decode()?.to_rgba8();
@@ -24,7 +23,6 @@ pub fn from_file<P: AsRef<Path>>(icon_path: P) -> Result<Icon, Error> {
/// This content can be included in your application at compile-time, e.g. using the `include_bytes!` macro.
/// You can pass an explicit file format. Otherwise, the file format will be guessed at runtime.
#[cfg(feature = "image")]
-#[cfg_attr(docsrs, doc(cfg(feature = "image")))]
pub fn from_file_data(
data: &[u8],
explicit_format: Option<image_rs::ImageFormat>,
@@ -60,7 +58,6 @@ pub enum Error {
/// The `image` crate reported an error.
#[cfg(feature = "image")]
- #[cfg_attr(docsrs, doc(cfg(feature = "image")))]
#[error("Unable to create icon from a file: {0}")]
ImageError(#[from] image_rs::error::ImageError),
}