fix from_stdout/err

This commit is contained in:
askiiart 2025-01-11 14:54:37 -06:00
parent eb67b255f0
commit 8c35325950
Signed by untrusted user who does not match committer: askiiart
GPG key ID: 6A32977DAF31746A

View file

@ -85,7 +85,7 @@ pub struct Line {
}
impl Line {
pub fn from_stdout<S: AsRef<String>>(content: S) -> Self {
pub fn from_stdout<S: AsRef<str>>(content: S) -> Self {
return Line {
content: content.as_ref().to_string(),
printed_to: LineType::Stdout,
@ -93,7 +93,7 @@ impl Line {
};
}
pub fn from_stderr<S: AsRef<String>>(content: S) -> Self {
pub fn from_stderr<S: AsRef<str>>(content: S) -> Self {
return Line {
content: content.as_ref().to_string(),
printed_to: LineType::Stderr,