forked from the-distro/ofborg
Fix the clippy ptr_arg lint
This commit is contained in:
parent
36fc9ab70d
commit
a91c6c5b12
|
@ -5,7 +5,7 @@ use crate::writetoline::LineWriter;
|
|||
|
||||
use std::fs::{self, File, OpenOptions};
|
||||
use std::io::Write;
|
||||
use std::path::{Component, PathBuf};
|
||||
use std::path::{Component, Path, PathBuf};
|
||||
|
||||
use lru_cache::LruCache;
|
||||
use tracing::warn;
|
||||
|
@ -34,7 +34,7 @@ pub struct LogMessage {
|
|||
message: MsgType,
|
||||
}
|
||||
|
||||
fn validate_path_segment(segment: &PathBuf) -> Result<(), String> {
|
||||
fn validate_path_segment(segment: &Path) -> Result<(), String> {
|
||||
let components = segment.components();
|
||||
|
||||
if components.count() == 0 {
|
||||
|
@ -148,7 +148,7 @@ impl LogMessageCollector {
|
|||
}
|
||||
}
|
||||
|
||||
fn open_file(&self, path: &PathBuf) -> Result<File, String> {
|
||||
fn open_file(&self, path: &Path) -> Result<File, String> {
|
||||
let dir = path.parent().unwrap();
|
||||
fs::create_dir_all(dir).unwrap();
|
||||
|
||||
|
|
Loading…
Reference in a new issue