fix clippy

This commit is contained in:
Evan Almloff 2023-07-14 12:51:20 -07:00
parent 97115f6537
commit 5896dfab1a
2 changed files with 5 additions and 5 deletions

View file

@ -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)
);

View file

@ -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 {