mirror of
https://github.com/nushell/nushell.git
synced 2025-08-17 01:41:15 +02:00
Clippy fix for Rust 1.63 (#6299)
Take more sensitive lints into account Somewhat ugly in some cases is the replacement of `.get(0)` with `.first()`
This commit is contained in:
committed by
GitHub
parent
08c98967e0
commit
c2f4969d4f
@ -163,7 +163,7 @@ impl From<String> for Cell {
|
||||
impl<'a> From<&'a str> for Cell {
|
||||
fn from(string: &'a str) -> Self {
|
||||
Self {
|
||||
width: unicode_width_strip_ansi(&*string),
|
||||
width: unicode_width_strip_ansi(string),
|
||||
contents: string.into(),
|
||||
alignment: Alignment::Left,
|
||||
}
|
||||
@ -243,7 +243,7 @@ impl Dimensions {
|
||||
/// Everything needed to format the cells with the grid options.
|
||||
///
|
||||
/// For more information, see the [`grid` crate documentation](index.html).
|
||||
#[derive(PartialEq, Debug)]
|
||||
#[derive(Eq, PartialEq, Debug)]
|
||||
pub struct Grid {
|
||||
options: GridOptions,
|
||||
cells: Vec<Cell>,
|
||||
@ -428,7 +428,7 @@ impl Grid {
|
||||
///
|
||||
/// This type implements `Display`, so you can get the textual version
|
||||
/// of the grid by calling `.to_string()`.
|
||||
#[derive(PartialEq, Debug)]
|
||||
#[derive(Eq, PartialEq, Debug)]
|
||||
pub struct Display<'grid> {
|
||||
/// The grid to display.
|
||||
grid: &'grid Grid,
|
||||
|
Reference in New Issue
Block a user