Skip to content

Commit

Permalink
revision: docs, compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DogeDark committed Apr 28, 2024
1 parent 8c7719b commit d9bb37c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
- [x] use_channel
- [x] use_window_size
- [x] use_interval
- [x] use_debounce
- [ ] use_timeout
- [ ] use_debouncer
- [ ] Camera
- [ ] WiFi
- [ ] Bluetooth
Expand Down
11 changes: 8 additions & 3 deletions sdk/src/clipboard/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
mod use_clipboard;

pub use use_clipboard::*;
cfg_if::cfg_if! {
if #[cfg(not(target_family = "wasm"))] {
mod use_clipboard;
pub use use_clipboard::*;
} else {
compile_error!("the `clipboard` feature is only available on desktop targets");
}
}
11 changes: 8 additions & 3 deletions sdk/src/color_scheme/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
mod use_preferred_color_scheme;

pub use use_preferred_color_scheme::*;
cfg_if::cfg_if! {
if #[cfg(target_family = "wasm")] {
mod use_preferred_color_scheme;
pub use use_preferred_color_scheme::*;
} else {
compile_error!("the `color_scheme` feature is only available on wasm targets");
}
}
2 changes: 1 addition & 1 deletion sdk/src/geolocation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ cfg_if::cfg_if! {
pub use self::use_geolocation::*;
}
else {
compile_error!("The geolocation module is not supported on this platform.");
compile_error!("the `geolocation` feature is only available on wasm and windows targets");
}
}
8 changes: 7 additions & 1 deletion sdk/src/notification/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
pub mod notification;
cfg_if::cfg_if! {
if #[cfg(not(target_family = "wasm"))] {
pub mod notification;
} else {
compile_error!("the `notification` feature is only available on desktop targets");
}
}

0 comments on commit d9bb37c

Please sign in to comment.