Merge pull request #587 from brown121407/master

Fix "trait objects without an explicit `dyn` are deprecated"
This commit is contained in:
Benjamin Sago 2020-01-19 00:50:32 +00:00 committed by GitHub
commit 3d82fc7683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ pub struct FileStyle {
pub classify: Classify,
/// Mapping of file extensions to colours, to highlight regular files.
pub exts: Box<FileColours>,
pub exts: Box<dyn FileColours>,
}
impl FileStyle {
@ -92,7 +92,7 @@ pub struct FileName<'a, 'dir: 'a, C: Colours+'a> {
classify: Classify,
/// Mapping of file extensions to colours, to highlight regular files.
exts: &'a FileColours,
exts: &'a dyn FileColours,
}

View File

@ -5,7 +5,7 @@ use crate::fs::fields as f;
impl f::Git {
pub fn render(&self, colours: &Colours) -> TextCell {
pub fn render(&self, colours: &dyn Colours) -> TextCell {
TextCell {
width: DisplayWidth::from(2),
contents: vec![
@ -18,7 +18,7 @@ impl f::Git {
impl f::GitStatus {
fn render(&self, colours: &Colours) -> ANSIString<'static> {
fn render(&self, colours: &dyn Colours) -> ANSIString<'static> {
match *self {
f::GitStatus::NotModified => colours.not_modified().paint("-"),
f::GitStatus::New => colours.new().paint("N"),