Bladeren bron

Fix ci failure on unused cfg deps

Jonathan Kelley 1 jaar geleden
bovenliggende
commit
6f15e0e924
3 gewijzigde bestanden met toevoegingen van 9 en 8 verwijderingen
  1. 6 6
      .github/workflows/main.yml
  2. 1 0
      packages/core/src/runtime.rs
  3. 2 2
      packages/html/src/file_data.rs

+ 6 - 6
.github/workflows/main.yml

@@ -42,11 +42,11 @@ jobs:
       SCCACHE_GHA_ENABLED: "true"
       RUSTC_WRAPPER: "sccache"
     steps:
+      - run: sudo apt-get update
+      - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
       - uses: dtolnay/rust-toolchain@stable
       - uses: mozilla-actions/sccache-action@v0.0.3
       - uses: ilammy/setup-nasm@v1
-      - run: sudo apt-get update
-      - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
       - uses: actions/checkout@v4
       - run: cargo check --all --examples --tests
 
@@ -60,11 +60,11 @@ jobs:
       SCCACHE_GHA_ENABLED: "true"
       RUSTC_WRAPPER: "sccache"
     steps:
+      - run: sudo apt-get update
+      - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
       - uses: dtolnay/rust-toolchain@stable
       - uses: mozilla-actions/sccache-action@v0.0.3
       - uses: ilammy/setup-nasm@v1
-      - run: sudo apt-get update
-      - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
       - uses: davidB/rust-cargo-make@v1
       - uses: browser-actions/setup-firefox@latest
       - uses: jetli/wasm-pack-action@v0.4.0
@@ -98,11 +98,11 @@ jobs:
       SCCACHE_GHA_ENABLED: "true"
       RUSTC_WRAPPER: "sccache"
     steps:
+      - run: sudo apt-get update
+      - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
       - uses: dtolnay/rust-toolchain@stable
       - uses: mozilla-actions/sccache-action@v0.0.3
       - uses: ilammy/setup-nasm@v1
-      - run: sudo apt-get update
-      - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
       - run: rustup component add clippy
       - uses: actions/checkout@v4
       - run: cargo clippy --workspace --examples --tests -- -D warnings

+ 1 - 0
packages/core/src/runtime.rs

@@ -133,6 +133,7 @@ impl Runtime {
 ///     }
 /// }
 ///
+/// # #[allow(non_snake_case)]
 /// fn Component(cx: Scope<ComponentProps>) -> Element {
 ///     cx.use_hook(|| RuntimeGuard::new(cx.props.runtime.clone()));
 ///

+ 2 - 2
packages/html/src/file_data.rs

@@ -1,4 +1,4 @@
-use std::{any::Any, collections::HashMap};
+use std::any::Any;
 
 pub trait HasFileData: std::any::Any {
     fn files(&self) -> Option<std::sync::Arc<dyn FileEngine>> {
@@ -10,7 +10,7 @@ pub trait HasFileData: std::any::Any {
 /// A file engine that serializes files to bytes
 #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq, Clone)]
 pub struct SerializedFileEngine {
-    pub files: HashMap<String, Vec<u8>>,
+    pub files: std::collections::HashMap<String, Vec<u8>>,
 }
 
 #[cfg(feature = "serialize")]