src/tools/file_logger.rs: new - accept AsRef<Path>
This commit is contained in:
parent
3c2012f97a
commit
d3d7ab1273
|
@ -34,7 +34,7 @@ macro_rules! flog {
|
|||
|
||||
impl FileLogger {
|
||||
|
||||
pub fn new(file_name: &str, to_stdout: bool) -> Result<Self, Error> {
|
||||
pub fn new<P: AsRef<std::path::Path>>(file_name: P, to_stdout: bool) -> Result<Self, Error> {
|
||||
|
||||
let file = std::fs::OpenOptions::new()
|
||||
.read(true)
|
||||
|
|
Loading…
Reference in New Issue