From a18c98716d5e742a034939024be9eea2325540b6 Mon Sep 17 00:00:00 2001 From: Fangdun Tsai Date: Fri, 8 Mar 2024 17:27:43 +0800 Subject: [PATCH] chore: clippy --- viz-handlers/src/serve/directory.rs | 1 - viz-router/src/resources.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 }