From 4da1263583a94d551e03ffaddbbdb12ac699b539 Mon Sep 17 00:00:00 2001 From: Finn Bear Date: Sat, 14 Sep 2024 23:59:27 -0700 Subject: [PATCH] Fix CI. (#3727) --- packages/yew-macro/src/derive_props/field.rs | 2 +- packages/yew/src/lib.rs | 1 + packages/yew/src/tests/layout_tests.rs | 2 ++ packages/yew/src/tests/mod.rs | 1 + tools/website-test/build.rs | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/yew-macro/src/derive_props/field.rs b/packages/yew-macro/src/derive_props/field.rs index da2af9ee97c..91e2ba08fad 100644 --- a/packages/yew-macro/src/derive_props/field.rs +++ b/packages/yew-macro/src/derive_props/field.rs @@ -57,7 +57,7 @@ impl PropField { props_name: &'a Ident, vis: &'a Visibility, token: &'a GenericParam, - ) -> PropFieldCheck<'_> { + ) -> PropFieldCheck<'a> { let check_struct = self.to_check_name(props_name); let check_arg = self.to_check_arg_name(props_name); PropFieldCheck { diff --git a/packages/yew/src/lib.rs b/packages/yew/src/lib.rs index 75442817802..8e0fda8aefd 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -295,6 +295,7 @@ mod renderer; #[cfg(feature = "csr")] #[cfg(test)] +#[allow(missing_docs)] pub mod tests; /// The module that contains all events available in the framework. diff --git a/packages/yew/src/tests/layout_tests.rs b/packages/yew/src/tests/layout_tests.rs index 657cc96a9d5..97c10df9bfc 100644 --- a/packages/yew/src/tests/layout_tests.rs +++ b/packages/yew/src/tests/layout_tests.rs @@ -31,12 +31,14 @@ impl Component for Comp { } #[derive(Debug)] +#[allow(missing_docs)] pub struct TestLayout<'a> { pub name: &'a str, pub node: VNode, pub expected: &'a str, } +#[allow(missing_docs)] pub fn diff_layouts(layouts: Vec>) { let document = gloo::utils::document(); let scope: AnyScope = AnyScope::test(); diff --git a/packages/yew/src/tests/mod.rs b/packages/yew/src/tests/mod.rs index 7c8881b072f..15ceb5fde75 100644 --- a/packages/yew/src/tests/mod.rs +++ b/packages/yew/src/tests/mod.rs @@ -1 +1,2 @@ +#[allow(missing_docs)] pub mod layout_tests; diff --git a/tools/website-test/build.rs b/tools/website-test/build.rs index 45b5746cdbc..8620d1100c1 100644 --- a/tools/website-test/build.rs +++ b/tools/website-test/build.rs @@ -62,7 +62,7 @@ impl Level { fn write_into(&self, dst: &mut String, name: &str, level: usize) -> fmt::Result { self.write_space(dst, level); - let name = name.replace(|c| c == '-' || c == '.', "_"); + let name = name.replace(['-', '.'], "_"); writeln!(dst, "pub mod {name} {{")?; self.write_inner(dst, level + 1)?;