diff options
author | Jeff Zhao <jeff.no.zhao@gmail.com> | 2021-09-26 13:59:04 -0400 |
---|---|---|
committer | Jeff Zhao <jeff.no.zhao@gmail.com> | 2021-09-26 13:59:04 -0400 |
commit | 98aaa57fb33e69fb6daf12b828ac6384caece44b (patch) | |
tree | 0cc70f9e0c81e397d600c1deba422617b03f74a3 /src/preview | |
parent | a918005d837fcd3a882dba6e4e713a730a6190ce (diff) |
code cleanup
Diffstat (limited to 'src/preview')
-rw-r--r-- | src/preview/preview_file.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/preview/preview_file.rs b/src/preview/preview_file.rs index db50098..6ed92a7 100644 --- a/src/preview/preview_file.rs +++ b/src/preview/preview_file.rs @@ -24,10 +24,9 @@ pub struct FilePreview { impl std::convert::From<Output> for FilePreview { fn from(output: Output) -> Self { let s = String::from_utf8_lossy(&output.stdout).to_string(); - let s2 = s.replace('\t', " "); - let s = s2.to_string(); + let s2 = s.replace('\t', " ").to_string(); let status = output.status; - Self { status, output: s } + Self { status, output: s2 } } } |