mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
Auto merge of #9395 - Alexendoo:suspicious-to-owned-test, r=Manishearth
Fix `suspicious_to_owned` test when `c_char` is `u8` e.g. on aarch64 linux changelog: none
This commit is contained in:
commit
e1ecdb621c
1 changed files with 2 additions and 2 deletions
|
@ -2,12 +2,12 @@
|
|||
#![warn(clippy::implicit_clone)]
|
||||
#![allow(clippy::redundant_clone)]
|
||||
use std::borrow::Cow;
|
||||
use std::ffi::CStr;
|
||||
use std::ffi::{c_char, CStr};
|
||||
|
||||
fn main() {
|
||||
let moo = "Moooo";
|
||||
let c_moo = b"Moooo\0";
|
||||
let c_moo_ptr = c_moo.as_ptr() as *const i8;
|
||||
let c_moo_ptr = c_moo.as_ptr() as *const c_char;
|
||||
let moos = ['M', 'o', 'o'];
|
||||
let moos_vec = moos.to_vec();
|
||||
|
||||
|
|
Loading…
Reference in a new issue