diff --git a/viz-handlers/src/serve/directory.rs b/viz-handlers/src/serve/directory.rs index 196cbc9b..50308125 100644 --- a/viz-handlers/src/serve/directory.rs +++ b/viz-handlers/src/serve/directory.rs @@ -8,7 +8,6 @@ use std::{ fs::read_dir, path::{Path, PathBuf}, str::FromStr, - string::ToString, }; use viz_core::{IntoResponse, Response, ResponseExt}; diff --git a/viz-router/src/resources.rs b/viz-router/src/resources.rs index 7fac8634..453ba2c0 100644 --- a/viz-router/src/resources.rs +++ b/viz-router/src/resources.rs @@ -10,7 +10,7 @@ use crate::Route; /// A Kind for generating Resources path. #[derive(Clone, Debug, PartialEq, Eq)] pub(crate) enum Kind { - /// index | create: `` + /// index | create Empty, /// new: `new` New, @@ -37,7 +37,7 @@ impl Resources { where S: AsRef, { - self.name = name.as_ref().to_owned(); + name.as_ref().clone_into(&mut self.name); self }