[rustfmt][clippy] more lints, better formatting

This commit is contained in:
ddidderr 2023-07-12 12:39:55 +02:00
parent e1e1a5c62b
commit b792276b05
Signed by: ddidderr
GPG Key ID: 3841F1C27E6F0E14
2 changed files with 12 additions and 12 deletions

View File

@ -1 +1,3 @@
imports_layout = "Vertical"
group_imports = "StdExternalCrate"
imports_granularity = "Crate"
imports_layout = "HorizontalVertical"

View File

@ -1,17 +1,16 @@
use chrono::prelude::*;
#![warn(clippy::pedantic)]
#![warn(clippy::todo)]
#![warn(clippy::unwrap_used)]
#![allow(clippy::inline_always)]
use std::{
env::args,
fs::File,
io::{
stdin,
stdout,
Error as IoError,
ErrorKind,
Read,
Write,
},
io::{stdin, stdout, Error as IoError, ErrorKind, Read, Write},
};
use chrono::prelude::*;
const TIME_FORMAT: &str = "%H:%M:%S%.6f";
type LogtimesResult = Result<(), IoError>;
@ -81,9 +80,8 @@ fn run() -> LogtimesResult {
if let Err(e) = inp.read_exact(&mut buf) {
if e.kind() == ErrorKind::UnexpectedEof {
return Ok(());
} else {
return Err(e);
}
return Err(e);
}
// push that char to the "current line" buffer