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.
1 parent bdb805b commit a8f5236Copy full SHA for a8f5236
src/liballoc/tests/borrow.rs
@@ -9,7 +9,7 @@
9
// except according to those terms.
10
11
use std::borrow::Cow;
12
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
13
use std::ffi::{CStr, CString, OSStr, OSString};
14
15
#[test]
@@ -27,8 +27,8 @@ fn test_cow_from() {
27
assert_eq!(Cow::from(v), Cow::Owned(VALUES.iter().collect::<Vec<_>>()));
28
29
let p = PathBuf::new();
30
- assert_eq!(Cow::from(&p), Cow::Borrowed(p.as_path()));
31
- assert_eq!(Cow::from(v.as_path()), Cow::Borrowed(p.as_path()));
+ assert_eq!(Cow::from(&p), Cow::Borrowed(Path::new("")));
+ assert_eq!(Cow::from(p.as_path()), Cow::Borrowed(Path::new("")));
32
33
let cstring = CString::new(MSG);
34
let cstr = {
0 commit comments