mirror of
https://github.com/supleed2/sv-filelist-parser.git
synced 2024-12-22 21:35:49 +00:00
Fix file path as_ref usage
This commit is contained in:
parent
2972aa9b10
commit
9d90e78644
|
@ -59,6 +59,7 @@ impl Filelist {
|
|||
/// Returns an error if the filelist in `path` cannot be read. Also returns
|
||||
/// error if any of the nested filelists cannot be read.
|
||||
pub fn parse_file(path: impl AsRef<Path>) -> Result<Filelist, Box<dyn Error>> {
|
||||
let path = path.as_ref();
|
||||
let contents = fs::read_to_string(path)?;
|
||||
|
||||
let mut filelist = Filelist::new();
|
||||
|
|
Loading…
Reference in a new issue