mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-29 15:13:54 +00:00
Fix "trait objects without an explicit dyn
are deprecated"
This commit is contained in:
parent
89c861f24d
commit
f6071e9c46
@ -16,7 +16,7 @@ pub struct FileStyle {
|
|||||||
pub classify: Classify,
|
pub classify: Classify,
|
||||||
|
|
||||||
/// Mapping of file extensions to colours, to highlight regular files.
|
/// Mapping of file extensions to colours, to highlight regular files.
|
||||||
pub exts: Box<FileColours>,
|
pub exts: Box<dyn FileColours>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FileStyle {
|
impl FileStyle {
|
||||||
@ -92,7 +92,7 @@ pub struct FileName<'a, 'dir: 'a, C: Colours+'a> {
|
|||||||
classify: Classify,
|
classify: Classify,
|
||||||
|
|
||||||
/// Mapping of file extensions to colours, to highlight regular files.
|
/// Mapping of file extensions to colours, to highlight regular files.
|
||||||
exts: &'a FileColours,
|
exts: &'a dyn FileColours,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ use fs::fields as f;
|
|||||||
|
|
||||||
|
|
||||||
impl f::Git {
|
impl f::Git {
|
||||||
pub fn render(&self, colours: &Colours) -> TextCell {
|
pub fn render(&self, colours: &dyn Colours) -> TextCell {
|
||||||
TextCell {
|
TextCell {
|
||||||
width: DisplayWidth::from(2),
|
width: DisplayWidth::from(2),
|
||||||
contents: vec![
|
contents: vec![
|
||||||
@ -18,7 +18,7 @@ impl f::Git {
|
|||||||
|
|
||||||
|
|
||||||
impl f::GitStatus {
|
impl f::GitStatus {
|
||||||
fn render(&self, colours: &Colours) -> ANSIString<'static> {
|
fn render(&self, colours: &dyn Colours) -> ANSIString<'static> {
|
||||||
match *self {
|
match *self {
|
||||||
f::GitStatus::NotModified => colours.not_modified().paint("-"),
|
f::GitStatus::NotModified => colours.not_modified().paint("-"),
|
||||||
f::GitStatus::New => colours.new().paint("N"),
|
f::GitStatus::New => colours.new().paint("N"),
|
||||||
|
Loading…
Reference in New Issue
Block a user