Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ergonomic Change to Option Arguments #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Ran formatter
jsouto18 committed Feb 22, 2020
commit ae33d6f9547f433b71393c8fc129800e256e7e54
10 changes: 8 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1596,7 +1596,10 @@ impl ColorSpec {
}

/// Set the foreground color.
pub fn set_fg(&mut self, color: impl Into<Option<Color>>) -> &mut ColorSpec {
pub fn set_fg(
&mut self,
color: impl Into<Option<Color>>,
) -> &mut ColorSpec {
self.fg_color = color.into();
self
}
@@ -1607,7 +1610,10 @@ impl ColorSpec {
}

/// Set the background color.
pub fn set_bg(&mut self, color: impl Into<Option<Color>>) -> &mut ColorSpec {
pub fn set_bg(
&mut self,
color: impl Into<Option<Color>>,
) -> &mut ColorSpec {
self.bg_color = color.into();
self
}