Don't accept Mutability
by ref
This commit is contained in:
parent
da40965300
commit
e51cd6e822
1 changed files with 2 additions and 2 deletions
|
@ -789,7 +789,7 @@ impl Mutability {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `""` (empty string) or `"mut "` depending on the mutability.
|
/// Returns `""` (empty string) or `"mut "` depending on the mutability.
|
||||||
pub fn prefix_str(&self) -> &'static str {
|
pub fn prefix_str(self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
Mutability::Mut => "mut ",
|
Mutability::Mut => "mut ",
|
||||||
Mutability::Not => "",
|
Mutability::Not => "",
|
||||||
|
@ -797,7 +797,7 @@ impl Mutability {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `"&"` or `"&mut "` depending on the mutability.
|
/// Returns `"&"` or `"&mut "` depending on the mutability.
|
||||||
pub fn ref_prefix_str(&self) -> &'static str {
|
pub fn ref_prefix_str(self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
Mutability::Not => "&",
|
Mutability::Not => "&",
|
||||||
Mutability::Mut => "&mut ",
|
Mutability::Mut => "&mut ",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue