Remove unused Display implementations

After the previous commit, nushell uses PrettyDebug and
PrettyDebugWithSource for our pretty-printed display output.

PrettyDebug produces a structured `pretty.rs` document rather than
writing directly into a fmt::Formatter, and types that implement
`PrettyDebug` have a convenience `display` method that produces a string
(to be used in situations where `Display` is needed for compatibility
with other traits, or where simple rendering is appropriate).
This commit is contained in:
Yehuda Katz
2019-11-25 10:07:20 -08:00
parent f70c6d5d48
commit 5fbea31d15
11 changed files with 182 additions and 165 deletions

View File

@@ -6,6 +6,7 @@ pub use std::path::PathBuf;
use app_dirs::{get_app_root, AppDataType};
use getset::Getters;
use nu_source::PrettyDebug;
use std::io::Read;
use tempfile::{tempdir, TempDir};
@@ -45,7 +46,7 @@ impl DisplayPath for &String {
impl DisplayPath for nu::AbsolutePath {
fn display_path(&self) -> String {
self.to_string()
self.display()
}
}