Home > other >  Fs: Rust: read_dir (& PTH) can only be introduced into a specific string, the input string parameter
Fs: Rust: read_dir (& PTH) can only be introduced into a specific string, the input string parameter

Time:02-25

Dear bosses, why Rust fs: : read_dir (& amp; PTH) method is introduced into parameter error, if directly into specific string can run normally, this is why

[code=rust]
Let PTH=Path: : the new (& amp; The path);
the fs: : read_dir (& amp; PTH). Unwrap ();
[/code]


The following error:
Thread 'main' panicked at 'called ` Result: : unwrap ` () on an ` Err ` value: Os {code: 123, kind: the Other message: "the filename, directory name, or volume slogan method is not correct,"}'
  • Related