(&self, path: &WorkspacePath)
| 769 | } |
| 770 | |
| 771 | pub fn display_path(&self, path: &WorkspacePath) -> String { |
| 772 | if path.is_root() { |
| 773 | return self.workspace_ref.display_root.clone(); |
| 774 | } |
| 775 | |
| 776 | let root = self.workspace_ref.display_root.trim_end_matches('/'); |
| 777 | if root.is_empty() { |
| 778 | path.as_str().to_string() |
| 779 | } else { |
| 780 | format!("{root}/{}", path.as_str()) |
| 781 | } |
| 782 | } |
| 783 | } |
| 784 | |
| 785 | /// Builder for assembling workspace services without constructor arity churn. |