Use nightly clippy to kill dead code/fix style (#12334)

- **Remove duplicated imports**
- **Remove unused field in `CompletionOptions`**
- **Remove unused struct in `nu-table`**
- **Clarify generic bounds**
- **Simplify a subtrait bound for `ExactSizeIterator`**
- **Use `unwrap_or_default`**
- **Use `Option` directly instead of empty string**
- **Elide unneeded clone in `to html`**
This commit is contained in:
Stefan Holderbach
2024-03-30 02:17:28 +01:00
committed by GitHub
parent ff2aba7ae3
commit e889679d42
17 changed files with 46 additions and 84 deletions

View File

@ -2,7 +2,7 @@
use std::collections::{btree_map, BTreeMap};
#[cfg(feature = "preserve_order")]
use linked_hash_map::{self, LinkedHashMap};
use linked_hash_map::LinkedHashMap;
use std::fmt;
use std::io;
@ -1094,9 +1094,9 @@ impl<'de> de::MapAccess<'de> for MapDeserializer {
}
}
pub fn to_value<T: ?Sized>(value: &T) -> Result<Value>
pub fn to_value<T>(value: &T) -> Result<Value>
where
T: ser::Serialize,
T: ser::Serialize + ?Sized,
{
value.serialize(Serializer)
}