fix clippy
This commit is contained in:
1 parent
97115f6537
commit
5896dfab1a
2 files changed
+5
-5
No files matched your search
@@ -1,5 +1,3 @@
|
|||||||
use std::borrow::Borrow;
|
|
||||||
|
|
||||||
use dioxus_core_macro::*;
|
use dioxus_core_macro::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -20,7 +18,7 @@ fn formatting_compiles() {
|
|||||||
|
|
||||||
// function calls in formatings work
|
// function calls in formatings work
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
format_args_f!("{x.borrow():?}").to_string(),
|
format_args_f!("{x.clone():?}").to_string(),
|
||||||
format!("{:?}", x)
|
format!("{:?}", x)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -62,13 +62,15 @@ impl WrapBody for DefaultRenderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PathMapFn = Arc<dyn Fn(&str) -> PathBuf + Send + Sync>;
|
||||||
|
|
||||||
/// A configuration for the incremental renderer.
|
/// A configuration for the incremental renderer.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct IncrementalRendererConfig {
|
pub struct IncrementalRendererConfig {
|
||||||
static_dir: PathBuf,
|
static_dir: PathBuf,
|
||||||
memory_cache_limit: usize,
|
memory_cache_limit: usize,
|
||||||
invalidate_after: Option<Duration>,
|
invalidate_after: Option<Duration>,
|
||||||
map_path: Option<Arc<dyn Fn(&str) -> PathBuf + Send + Sync>>,
|
map_path: Option<PathMapFn>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for IncrementalRendererConfig {
|
impl Default for IncrementalRendererConfig {
|
||||||
@@ -143,7 +145,7 @@ pub struct IncrementalRenderer {
|
|||||||
Option<lru::LruCache<String, (SystemTime, Vec<u8>), BuildHasherDefault<FxHasher>>>,
|
Option<lru::LruCache<String, (SystemTime, Vec<u8>), BuildHasherDefault<FxHasher>>>,
|
||||||
invalidate_after: Option<Duration>,
|
invalidate_after: Option<Duration>,
|
||||||
ssr_renderer: crate::Renderer,
|
ssr_renderer: crate::Renderer,
|
||||||
map_path: Arc<dyn Fn(&str) -> PathBuf + Send + Sync>,
|
map_path: PathMapFn,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IncrementalRenderer {
|
impl IncrementalRenderer {
|
||||||
|
|||||||
Reference in new issue
Block a user