We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PathBuf
1 parent 6e8f92f commit fd073cfCopy full SHA for fd073cf
src/librustdoc/externalfiles.rs
@@ -11,7 +11,7 @@
11
use std::fs::File;
12
use std::io::prelude::*;
13
use std::io;
14
-use std::path::{PathBuf, Path};
+use std::path::Path;
15
use std::str;
16
17
#[derive(Clone)]
@@ -47,8 +47,8 @@ pub fn load_string(input: &Path) -> io::Result<Option<String>> {
47
macro_rules! load_or_return {
48
($input: expr, $cant_read: expr, $not_utf8: expr) => {
49
{
50
- let input = PathBuf::from(&$input[..]);
51
- match ::externalfiles::load_string(&input) {
+ let input = Path::new(&$input[..]);
+ match ::externalfiles::load_string(input) {
52
Err(e) => {
53
let _ = writeln!(&mut io::stderr(),
54
"error reading `{}`: {}", input.display(), e);
0 commit comments