Skip to content

Commit 3cc3594

Browse files
committed
Make animation module only available in native
1 parent 2753103 commit 3cc3594

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
1111
)]
1212
pub mod alignment;
13+
#[cfg(not(target_arch = "wasm32"))]
1314
pub mod animation;
1415
pub mod border;
1516
pub mod clipboard;

src/lib.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -498,20 +498,25 @@ pub mod window;
498498
pub mod advanced;
499499

500500
pub use crate::core::alignment;
501-
pub use crate::core::animation;
502501
pub use crate::core::border;
503502
pub use crate::core::color;
504503
pub use crate::core::gradient;
505504
pub use crate::core::padding;
506505
pub use crate::core::theme;
507506
pub use crate::core::{
508-
Alignment, Animation, Background, Border, Color, ContentFit, Degrees,
509-
Gradient, Length, Padding, Pixels, Point, Radians, Rectangle, Rotation,
510-
Settings, Shadow, Size, Theme, Transformation, Vector,
507+
Alignment, Background, Border, Color, ContentFit, Degrees, Gradient,
508+
Length, Padding, Pixels, Point, Radians, Rectangle, Rotation, Settings,
509+
Shadow, Size, Theme, Transformation, Vector,
511510
};
512511
pub use crate::runtime::exit;
513512
pub use iced_futures::Subscription;
514513

514+
#[cfg(not(target_arch = "wasm32"))]
515+
pub use crate::core::animation;
516+
517+
#[cfg(not(target_arch = "wasm32"))]
518+
pub use crate::core::Animation;
519+
515520
pub use alignment::Horizontal::{Left, Right};
516521
pub use alignment::Vertical::{Bottom, Top};
517522
pub use Alignment::Center;

0 commit comments

Comments
 (0)