fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: this `to_owned` call clones the Cow<'_, str> itself and does not cause the Cow<'_, str> contents to become owned 2 --> $DIR/suspicious_to_owned.rs:17:13 3 | 4LL | let _ = cow.to_owned(); 5 | ^^^^^^^^^^^^^^ 6 | 7 = note: `-D clippy::suspicious-to-owned` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::suspicious_to_owned)]` 9help: depending on intent, either make the Cow an Owned variant 10 | 11LL | let _ = cow.into_owned(); 12 | ~~~~~~~~~~~~~~~~ 13help: or clone the Cow itself 14 | 15LL | let _ = cow.clone(); 16 | ~~~~~~~~~~~ 17 18error: this `to_owned` call clones the Cow<'_, [char; 3]> itself and does not cause the Cow<'_, [char; 3]> contents to become owned 19 --> $DIR/suspicious_to_owned.rs:29:13 20 | 21LL | let _ = cow.to_owned(); 22 | ^^^^^^^^^^^^^^ 23 | 24help: depending on intent, either make the Cow an Owned variant 25 | 26LL | let _ = cow.into_owned(); 27 | ~~~~~~~~~~~~~~~~ 28help: or clone the Cow itself 29 | 30LL | let _ = cow.clone(); 31 | ~~~~~~~~~~~ 32 33error: this `to_owned` call clones the Cow<'_, Vec<char>> itself and does not cause the Cow<'_, Vec<char>> contents to become owned 34 --> $DIR/suspicious_to_owned.rs:40:13 35 | 36LL | let _ = cow.to_owned(); 37 | ^^^^^^^^^^^^^^ 38 | 39help: depending on intent, either make the Cow an Owned variant 40 | 41LL | let _ = cow.into_owned(); 42 | ~~~~~~~~~~~~~~~~ 43help: or clone the Cow itself 44 | 45LL | let _ = cow.clone(); 46 | ~~~~~~~~~~~ 47 48error: this `to_owned` call clones the Cow<'_, str> itself and does not cause the Cow<'_, str> contents to become owned 49 --> $DIR/suspicious_to_owned.rs:51:13 50 | 51LL | let _ = cow.to_owned(); 52 | ^^^^^^^^^^^^^^ 53 | 54help: depending on intent, either make the Cow an Owned variant 55 | 56LL | let _ = cow.into_owned(); 57 | ~~~~~~~~~~~~~~~~ 58help: or clone the Cow itself 59 | 60LL | let _ = cow.clone(); 61 | ~~~~~~~~~~~ 62 63error: implicitly cloning a `String` by calling `to_owned` on its dereferenced type 64 --> $DIR/suspicious_to_owned.rs:66:13 65 | 66LL | let _ = String::from(moo).to_owned(); 67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `String::from(moo).clone()` 68 | 69 = note: `-D clippy::implicit-clone` implied by `-D warnings` 70 = help: to override `-D warnings` add `#[allow(clippy::implicit_clone)]` 71 72error: implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type 73 --> $DIR/suspicious_to_owned.rs:69:13 74 | 75LL | let _ = moos_vec.to_owned(); 76 | ^^^^^^^^^^^^^^^^^^^ help: consider using: `moos_vec.clone()` 77 78error: aborting due to 6 previous errors 79