From 5e0d5b7f9ab28540414ee8752617c5e5a228487e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 8 Apr 2021 15:03:11 +0200 Subject: [PATCH] Fix `Debug` impl for `Text` to only display the slice a `Text` refers to ...as opposed to the whole string. --- zed/src/editor/buffer/text.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zed/src/editor/buffer/text.rs b/zed/src/editor/buffer/text.rs index 1a074d4a75..147ffdd86a 100644 --- a/zed/src/editor/buffer/text.rs +++ b/zed/src/editor/buffer/text.rs @@ -162,7 +162,7 @@ impl<'a> From<&'a str> for Text { impl Debug for Text { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_tuple("Text").field(&self.text).finish() + f.debug_tuple("Text").field(&self.as_str()).finish() } }