Remove mut from traits

The compiler complained that this would become a hard error in a future release (see rust-lang#35203)
This commit is contained in:
Benjamin Sago
2017-08-04 03:11:26 +01:00
parent 94de55c0f7
commit fd8992ed87
+3 -3
View File
@@ -476,7 +476,7 @@ pub mod os {
/// Sets this user values home directory to the given string.
/// Can be used to construct test users, which by default come with a
/// dummy home directory string.
fn with_home_dir(mut self, home_dir: &str) -> Self;
fn with_home_dir(self, home_dir: &str) -> Self;
/// Returns a path to this users shell.
fn shell(&self) -> &Path;
@@ -484,7 +484,7 @@ pub mod os {
/// Sets this users shell path to the given string.
/// Can be used to construct test users, which by default come with a
/// dummy shell field.
fn with_shell(mut self, shell: &str) -> Self;
fn with_shell(self, shell: &str) -> Self;
// TODO(ogham): Isnt it weird that the setters take string slices, but
// the getters return paths?
@@ -498,7 +498,7 @@ pub mod os {
fn members(&self) -> &[String];
/// Adds a new member to this group.
fn add_member(mut self, name: &str) -> Self;
fn add_member(self, name: &str) -> Self;
}
/// Unix-specific fields for `User`s.