Evan Almloff 1 gadu atpakaļ
vecāks
revīzija
5896dfab1a

+ 1 - 3
packages/core-macro/tests/ifmt.rs

@@ -1,5 +1,3 @@
-use std::borrow::Borrow;
-
 use dioxus_core_macro::*;
 
 #[test]
@@ -20,7 +18,7 @@ fn formatting_compiles() {
 
     // function calls in formatings work
     assert_eq!(
-        format_args_f!("{x.borrow():?}").to_string(),
+        format_args_f!("{x.clone():?}").to_string(),
         format!("{:?}", x)
     );
 

+ 4 - 2
packages/ssr/src/incremental.rs

@@ -62,13 +62,15 @@ impl WrapBody for DefaultRenderer {
     }
 }
 
+type PathMapFn = Arc<dyn Fn(&str) -> PathBuf + Send + Sync>;
+
 /// A configuration for the incremental renderer.
 #[derive(Clone)]
 pub struct IncrementalRendererConfig {
     static_dir: PathBuf,
     memory_cache_limit: usize,
     invalidate_after: Option<Duration>,
-    map_path: Option<Arc<dyn Fn(&str) -> PathBuf + Send + Sync>>,
+    map_path: Option<PathMapFn>,
 }
 
 impl Default for IncrementalRendererConfig {
@@ -143,7 +145,7 @@ pub struct IncrementalRenderer {
         Option<lru::LruCache<String, (SystemTime, Vec<u8>), BuildHasherDefault<FxHasher>>>,
     invalidate_after: Option<Duration>,
     ssr_renderer: crate::Renderer,
-    map_path: Arc<dyn Fn(&str) -> PathBuf + Send + Sync>,
+    map_path: PathMapFn,
 }
 
 impl IncrementalRenderer {