Closed
Description
Stable build: https://travis-ci.org/SUPERAndroidAnalyzer/super/jobs/158500096
Beta build: https://travis-ci.org/SUPERAndroidAnalyzer/super/jobs/158500095
Nightly build: https://travis-ci.org/SUPERAndroidAnalyzer/super/jobs/158500094
Beta and nightly fail when trying to get a file name as a String
from a PathBuf
. The code is the following:
let dir_iter = try!(fs::read_dir("some/random/path"));
for f in dir_iter {
let path_file = match f.unwrap().path().file_name() {
Some(n) => String::from(n.to_string_lossy().borrow()),
None => String::new(),
};
println!("{}", path_file);
}
And it also happens when getting the value from an AsRef<str>
, in this example code:
pub fn new<S: AsRef<str>>(somedata: S) -> String {
String::from(somedata.as_ref())
}
In both cases the error is the same:
type annotations required: cannot resolve std::string::String: std::convert::From<&_>