mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 04:45:04 +02:00
Rust 1.49 Clippy Fixes (#2835)
This commit is contained in:
@ -46,10 +46,7 @@ impl TextStyle {
|
||||
}
|
||||
|
||||
pub fn bold(&self, bool_value: Option<bool>) -> TextStyle {
|
||||
let bv = match bool_value {
|
||||
Some(v) => v,
|
||||
None => false,
|
||||
};
|
||||
let bv = bool_value.unwrap_or(false);
|
||||
|
||||
TextStyle {
|
||||
alignment: self.alignment,
|
||||
|
@ -74,7 +74,7 @@ pub fn split_sublines(input: &str) -> Vec<Vec<Subline>> {
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
|
||||
pub fn column_width<'a>(input: &[Vec<Subline<'a>>]) -> usize {
|
||||
pub fn column_width(input: &[Vec<Subline>]) -> usize {
|
||||
let mut max = 0;
|
||||
|
||||
for line in input {
|
||||
@ -100,7 +100,7 @@ pub fn column_width<'a>(input: &[Vec<Subline<'a>>]) -> usize {
|
||||
max
|
||||
}
|
||||
|
||||
fn split_word<'a>(cell_width: usize, word: &'a str) -> Vec<Subline<'a>> {
|
||||
fn split_word(cell_width: usize, word: &str) -> Vec<Subline> {
|
||||
use unicode_width::UnicodeWidthChar;
|
||||
|
||||
let mut output = vec![];
|
||||
|
Reference in New Issue
Block a user