script: Limit public exports. (#34915)

* script: Restrict reexport visibility of DOM types.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Mass pub->pub(crate) conversion.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Hide existing dead code warnings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix clippy warnings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix unit tests.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix clippy.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* More formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-01-10 03:19:19 -05:00 committed by GitHub
parent f220d6d3a5
commit c94d909a86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
585 changed files with 5411 additions and 5013 deletions

View file

@ -21,7 +21,7 @@ pub(crate) struct AnimationTimeline {
impl AnimationTimeline {
/// Creates a new "normal" timeline, i.e., a "Current" mode timer.
#[inline]
pub fn new() -> Self {
pub(crate) fn new() -> Self {
Self {
current_value: SystemTime::now()
.duration_since(UNIX_EPOCH)
@ -32,17 +32,17 @@ impl AnimationTimeline {
/// Creates a new "test mode" timeline, with initial time 0.
#[inline]
pub fn new_for_testing() -> Self {
pub(crate) fn new_for_testing() -> Self {
Self { current_value: 0. }
}
/// Returns the current value of the timeline in seconds.
pub fn current_value(&self) -> f64 {
pub(crate) fn current_value(&self) -> f64 {
self.current_value
}
/// Updates the value of the `AnimationTimeline` to the current clock time.
pub fn update(&mut self) {
pub(crate) fn update(&mut self) {
self.current_value = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap_or_default()
@ -51,7 +51,7 @@ impl AnimationTimeline {
/// Increments the current value of the timeline by a specific number of seconds.
/// This is used for testing.
pub fn advance_specific(&mut self, by: f64) {
pub(crate) fn advance_specific(&mut self, by: f64) {
self.current_value += by;
}
}