We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b8fbc0 commit a243224Copy full SHA for a243224
1 file changed
crates/mac_core/src/string.rs
@@ -189,13 +189,13 @@ mod tests {
189
assert_eq!(str.as_str(), Cow::Borrowed("foo"));
190
191
let non_str = CFString::new(c"\xC3\x28bar");
192
- assert_eq!(non_str.as_str(), Cow::Owned("\0\0bar"));
+ assert_eq!(non_str.as_str(), Cow::Owned("\0\0bar".to_string()));
193
}
194
195
#[test]
196
fn test_as_cstr() {
197
let str = CFString::new("foo");
198
- assert_eq!(str.as_cstr(), Cow::Owned(c"foo"));
+ assert_eq!(str.as_cstr(), Cow::Owned(c"foo".to_owned()));
199
200
let cstr = CFString::new(c"foo");
201
assert_eq!(cstr.as_cstr(), Cow::Borrowed(c"foo"));
0 commit comments