Skip to content

Commit f6071e9

Browse files
author
Alexandru-Sergiu Marton
committed
Fix "trait objects without an explicit dyn are deprecated"
1 parent 89c861f commit f6071e9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/output/file_name.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct FileStyle {
1616
pub classify: Classify,
1717

1818
/// Mapping of file extensions to colours, to highlight regular files.
19-
pub exts: Box<FileColours>,
19+
pub exts: Box<dyn FileColours>,
2020
}
2121

2222
impl FileStyle {
@@ -92,7 +92,7 @@ pub struct FileName<'a, 'dir: 'a, C: Colours+'a> {
9292
classify: Classify,
9393

9494
/// Mapping of file extensions to colours, to highlight regular files.
95-
exts: &'a FileColours,
95+
exts: &'a dyn FileColours,
9696
}
9797

9898

src/output/render/git.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use fs::fields as f;
55

66

77
impl f::Git {
8-
pub fn render(&self, colours: &Colours) -> TextCell {
8+
pub fn render(&self, colours: &dyn Colours) -> TextCell {
99
TextCell {
1010
width: DisplayWidth::from(2),
1111
contents: vec![
@@ -18,7 +18,7 @@ impl f::Git {
1818

1919

2020
impl f::GitStatus {
21-
fn render(&self, colours: &Colours) -> ANSIString<'static> {
21+
fn render(&self, colours: &dyn Colours) -> ANSIString<'static> {
2222
match *self {
2323
f::GitStatus::NotModified => colours.not_modified().paint("-"),
2424
f::GitStatus::New => colours.new().paint("N"),

0 commit comments

Comments
 (0)