Unverified Commit a8c85897 authored by Michael Müller's avatar Michael Müller Committed by GitHub

Fix `clippy:wrong_self_convention` (#256)

error: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
  --> src/workspace/profile.rs:75:22
   |
75 |     fn to_toml_value(&self) -> value::Value {
   |                      ^^^^^
   |
   = note: `-D clippy::wrong-self-convention` implied by `-D warnings`
   = help: consider choosing a less ambiguous name
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

error: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
   --> src/workspace/profile.rs:102:22
    |
102 |     fn to_toml_value(&self) -> value::Value {
    |                      ^^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

error: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
   --> src/workspace/profile.rs:121:22
    |
121 |     fn to_toml_value(&self) -> value::Value {
    |                      ^^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
parent ef1f2bd7
Pipeline #134793 passed with stages
in 8 minutes and 15 seconds
......@@ -72,7 +72,7 @@ pub enum OptLevel {
}
impl OptLevel {
fn to_toml_value(&self) -> value::Value {
fn to_toml_value(self) -> value::Value {
match self {
OptLevel::NoOptimizations => 0.into(),
OptLevel::O1 => 1.into(),
......@@ -99,7 +99,7 @@ pub enum Lto {
}
impl Lto {
fn to_toml_value(&self) -> value::Value {
fn to_toml_value(self) -> value::Value {
match self {
Lto::ThinLocal => false.into(),
Lto::Fat => "fat".into(),
......@@ -118,7 +118,7 @@ pub enum PanicStrategy {
}
impl PanicStrategy {
fn to_toml_value(&self) -> value::Value {
fn to_toml_value(self) -> value::Value {
match self {
PanicStrategy::Unwind => "unwind".into(),
PanicStrategy::Abort => "abort".into(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment