mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:36:08 +02:00
Clippy fixes for new Rust version (#3392)
This commit is contained in:
@ -213,15 +213,9 @@ pub fn view_contents(
|
||||
skip: Option<&Value>,
|
||||
length: Option<&Value>,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let skip_bytes = match skip {
|
||||
Some(s) => Some(s.as_usize().unwrap_or(0)),
|
||||
None => None,
|
||||
};
|
||||
let skip_bytes = skip.map(|s| s.as_usize().unwrap_or(0));
|
||||
|
||||
let num_bytes = match length {
|
||||
Some(b) => Some(b.as_usize().unwrap_or(0)),
|
||||
None => None,
|
||||
};
|
||||
let num_bytes = length.map(|b| b.as_usize().unwrap_or(0));
|
||||
|
||||
let config = HexConfig {
|
||||
title: true,
|
||||
|
Reference in New Issue
Block a user