mirror of
https://github.com/lsd-rs/lsd
synced 2025-01-18 22:43:59 +00:00
cargo fmt src/display.rs
This commit is contained in:
parent
1ecbdeef46
commit
c1a3ef81ac
1 changed files with 5 additions and 3 deletions
|
@ -108,10 +108,8 @@ impl Display {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::path::Path;
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use color;
|
use color;
|
||||||
use color::Colors;
|
use color::Colors;
|
||||||
|
@ -119,6 +117,7 @@ mod tests {
|
||||||
use icon;
|
use icon;
|
||||||
use icon::Icons;
|
use icon::Icons;
|
||||||
use meta::{FileType, Name};
|
use meta::{FileType, Name};
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_display_get_visible_width() {
|
fn test_display_get_visible_width() {
|
||||||
|
@ -134,7 +133,10 @@ mod tests {
|
||||||
] {
|
] {
|
||||||
let path = Path::new(s);
|
let path = Path::new(s);
|
||||||
let name = Name::new(&path, FileType::File);
|
let name = Name::new(&path, FileType::File);
|
||||||
let output = name.render(&Colors::new(color::Theme::Default), &Icons::new(icon::Theme::Default));
|
let output = name.render(
|
||||||
|
&Colors::new(color::Theme::Default),
|
||||||
|
&Icons::new(icon::Theme::Default),
|
||||||
|
);
|
||||||
assert_eq!(display.get_visible_width(&output), *l);
|
assert_eq!(display.get_visible_width(&output), *l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue