mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
adjust fmt and clippy after toolchain upgrade
This commit is contained in:
@ -56,7 +56,9 @@ pub fn init(basic: bool) {
|
||||
.with_env_filter(filter);
|
||||
|
||||
if basic {
|
||||
subscriber.with_writer(|| StandardStream::stdout(ColorChoice::Auto)).init();
|
||||
subscriber
|
||||
.with_writer(|| StandardStream::stdout(ColorChoice::Auto))
|
||||
.init();
|
||||
} else {
|
||||
subscriber.with_writer(|| LOG.clone()).init();
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ use tracing::info;
|
||||
|
||||
const TPS: u64 = 30;
|
||||
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn main() -> io::Result<()> {
|
||||
let matches = App::new("Veloren server cli")
|
||||
.version(common::util::DISPLAY_VERSION_LONG.as_str())
|
||||
|
@ -204,12 +204,14 @@ impl Tui {
|
||||
|
||||
let block = Block::default().borders(Borders::ALL);
|
||||
|
||||
let mut wrap = Wrap::default();
|
||||
wrap.scroll_callback = Some(Box::new(|text_area, lines| {
|
||||
LOG.resize(text_area.height as usize);
|
||||
let len = lines.len() as u16;
|
||||
(len.saturating_sub(text_area.height), 0)
|
||||
}));
|
||||
let wrap = Wrap {
|
||||
scroll_callback: Some(Box::new(|text_area, lines| {
|
||||
LOG.resize(text_area.height as usize);
|
||||
let len = lines.len() as u16;
|
||||
(len.saturating_sub(text_area.height), 0)
|
||||
})),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let logger = Paragraph::new(LOG.inner.lock().unwrap().clone())
|
||||
.block(block)
|
||||
|
Reference in New Issue
Block a user