Add allow unused error

This commit is contained in:
DefectingCat
2023-04-13 20:56:52 +08:00
parent 6a2b51bb94
commit 4734c487b5
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
use thiserror::Error;
#[derive(Error, Debug)]
#[allow(dead_code, unused)]
pub enum CandyError {
#[error("can not parse target")]
Parse(String),

View File

@ -1,5 +1,5 @@
use std::io::Write;
use std::path::PathBuf;
use std::{io::Write, path::Path};
use crate::config::Config;
use anyhow::Result;
@ -10,7 +10,7 @@ use tokio::{
io::AsyncWriteExt,
};
pub async fn create_folder(file_path: &PathBuf) -> Result<()> {
pub async fn create_folder(file_path: &Path) -> Result<()> {
if file_path.exists() {
return Ok(());
} else {