瀏覽代碼

fix for the "\src\lib.rs:997:5: 1005:6 error: the trait `core::marker::Sized` is not implemented for the type `[collections::string::String]` [E0277]"

Jakko Sikkar 11 年之前
父節點
當前提交
be50b34fe4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/lib.rs

+ 1 - 1
src/lib.rs

@@ -994,7 +994,7 @@ fn file_url_path_to_pathbuf(path: &[String]) -> Result<PathBuf, ()> {
         return Err(())
     }
     let mut string = prefix.to_string();
-    for path_part in path[1..] {
+    for path_part in path.iter().skip(1) {
         string.push('\\');
 
         // Currently non-unicode windows paths cannot be represented