mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 15:48:54 +02:00
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:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user