mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 17:33:07 +00:00
dont deref
This commit is contained in:
parent
53928d5367
commit
f42442b6e0
@ -134,7 +134,7 @@ enum Method {
|
|||||||
|
|
||||||
impl Method {
|
impl Method {
|
||||||
fn suggestion(self) -> &'static str {
|
fn suggestion(self) -> &'static str {
|
||||||
match *self {
|
match self {
|
||||||
Method::Offset => "add",
|
Method::Offset => "add",
|
||||||
Method::WrappingOffset => "wrapping_add",
|
Method::WrappingOffset => "wrapping_add",
|
||||||
}
|
}
|
||||||
@ -143,7 +143,7 @@ impl Method {
|
|||||||
|
|
||||||
impl fmt::Display for Method {
|
impl fmt::Display for Method {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match *self {
|
match self {
|
||||||
Method::Offset => write!(f, "offset"),
|
Method::Offset => write!(f, "offset"),
|
||||||
Method::WrappingOffset => write!(f, "wrapping_offset"),
|
Method::WrappingOffset => write!(f, "wrapping_offset"),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user