diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-06-23 04:05:23 +0100 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2021-06-23 04:05:23 +0100 |
commit | 7b9fd186359f69f390c855f39ec2fed02fe79555 (patch) | |
tree | 5335f82a882d153cd3550ceaff92583ec984694f | |
parent | de4566548d9c17469ade5de9a137c197e0a63d35 (diff) |
Lint: function named to_* should consume argument
-rw-r--r-- | src/style.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/style.rs b/src/style.rs index 32f2f716..8fb9b2eb 100644 --- a/src/style.rs +++ b/src/style.rs @@ -80,7 +80,7 @@ impl Style { } } - pub fn to_painted_string(&self) -> ansi_term::ANSIGenericString<str> { + pub fn to_painted_string(self) -> ansi_term::ANSIGenericString<'static, str> { self.paint(self.to_string()) } } |