mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 11:15:49 +02:00
Silence Rust 1.45 Clippy warnings (#2196)
* Silence Rust 1.45 Clippy warnings dealing with using `map_err()` * Silence false Clippy warning * Fix last Clippy error for unnecessary conversion * Fix `and_then` clippy warnings
This commit is contained in:
@ -233,9 +233,9 @@ impl Signature {
|
||||
desc: impl Into<String>,
|
||||
short: Option<char>,
|
||||
) -> Signature {
|
||||
let s = short.and_then(|c| {
|
||||
let s = short.map(|c| {
|
||||
debug_assert!(!self.get_shorts().contains(&c));
|
||||
Some(c)
|
||||
c
|
||||
});
|
||||
self.named.insert(
|
||||
name.into(),
|
||||
@ -253,9 +253,9 @@ impl Signature {
|
||||
desc: impl Into<String>,
|
||||
short: Option<char>,
|
||||
) -> Signature {
|
||||
let s = short.and_then(|c| {
|
||||
let s = short.map(|c| {
|
||||
debug_assert!(!self.get_shorts().contains(&c));
|
||||
Some(c)
|
||||
c
|
||||
});
|
||||
|
||||
self.named.insert(
|
||||
@ -273,12 +273,12 @@ impl Signature {
|
||||
desc: impl Into<String>,
|
||||
short: Option<char>,
|
||||
) -> Signature {
|
||||
let s = short.and_then(|c| {
|
||||
let s = short.map(|c| {
|
||||
debug_assert!(
|
||||
!self.get_shorts().contains(&c),
|
||||
"There may be duplicate short flags, such as -h"
|
||||
);
|
||||
Some(c)
|
||||
c
|
||||
});
|
||||
|
||||
self.named
|
||||
|
Reference in New Issue
Block a user