mirror of
https://github.com/DefectingCat/rua-list
synced 2025-07-15 16:51:31 +00:00
Add allow unused error
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
#[allow(dead_code, unused)]
|
||||
pub enum CandyError {
|
||||
#[error("can not parse target")]
|
||||
Parse(String),
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user