mirror of
https://github.com/orhun/systeroid
synced 2024-10-04 14:39:06 +00:00
refactor(lint): use a let binding to create a longer lived value
This commit is contained in:
parent
94d369cf82
commit
1e02314070
|
@ -172,7 +172,8 @@ impl<'a, Output: Write> App<'a, Output> {
|
|||
/// Processes the parameters in the given file.
|
||||
pub fn preload_from_file(&mut self, path: PathBuf) -> Result<()> {
|
||||
if path == PathBuf::from("-") {
|
||||
let lines = io::stdin().lock().lines();
|
||||
let stdin = io::stdin();
|
||||
let lines = stdin.lock().lines();
|
||||
for line in lines {
|
||||
if let Err(e) = self.process_parameter(line?, true, false) {
|
||||
println!("{}: {}", env!("CARGO_PKG_NAME"), e);
|
||||
|
|
Loading…
Reference in a new issue