Skip to content

Commit

Permalink
fix unnecessary mut
Browse files Browse the repository at this point in the history
  • Loading branch information
msparkles committed Jul 3, 2024
1 parent b208879 commit e59f42d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/yakui-widgets/src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,27 @@ impl Fonts {
}

/// Sets the family that will be used by `Family::Serif`.
pub fn set_serif_family<S: Into<String>>(&mut self, family: S) {
pub fn set_serif_family<S: Into<String>>(&self, family: S) {
self.with_system(|font_system| font_system.db_mut().set_serif_family(family));
}

/// Sets the family that will be used by `Family::SansSerif`.
pub fn set_sans_serif_family<S: Into<String>>(&mut self, family: S) {
pub fn set_sans_serif_family<S: Into<String>>(&self, family: S) {
self.with_system(|font_system| font_system.db_mut().set_sans_serif_family(family));
}

/// Sets the family that will be used by `Family::Cursive`.
pub fn set_cursive_family<S: Into<String>>(&mut self, family: S) {
pub fn set_cursive_family<S: Into<String>>(&self, family: S) {
self.with_system(|font_system| font_system.db_mut().set_cursive_family(family));
}

/// Sets the family that will be used by `Family::Fantasy`.
pub fn set_fantasy_family<S: Into<String>>(&mut self, family: S) {
pub fn set_fantasy_family<S: Into<String>>(&self, family: S) {
self.with_system(|font_system| font_system.db_mut().set_fantasy_family(family));
}

/// Sets the family that will be used by `Family::Monospace`.
pub fn set_monospace_family<S: Into<String>>(&mut self, family: S) {
pub fn set_monospace_family<S: Into<String>>(&self, family: S) {
self.with_system(|font_system| font_system.db_mut().set_monospace_family(family));
}
}
Expand Down

0 comments on commit e59f42d

Please sign in to comment.