Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Remove inaccurate comments (#23056)

Joseph T. Lyons85b727c1a28b
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 22d9650beb0..4170f70d2b8 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -6203,8 +6203,6 @@ impl Editor {
pub fn convert_to_title_case(&mut self, _: &ConvertToTitleCase, cx: &mut ViewContext<Self>) {
self.manipulate_text(cx, |text| {
- // Hack to get around the fact that to_case crate doesn't support '\n' as a word boundary
- // https://github.com/rutrum/convert-case/issues/16
text.split('\n')
.map(|line| line.to_case(Case::Title))
.join("\n")
@@ -6225,8 +6223,6 @@ impl Editor {
cx: &mut ViewContext<Self>,
) {
self.manipulate_text(cx, |text| {
- // Hack to get around the fact that to_case crate doesn't support '\n' as a word boundary
- // https://github.com/rutrum/convert-case/issues/16
text.split('\n')
.map(|line| line.to_case(Case::UpperCamel))
.join("\n")
diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs
index e477013e687..5770d0cf1a5 100644
--- a/crates/editor/src/editor_tests.rs
+++ b/crates/editor/src/editor_tests.rs
@@ -3705,7 +3705,6 @@ async fn test_manipulate_text(cx: &mut TestAppContext) {
"});
// Test multiple line, single selection case
- // Test code hack that covers the fact that to_case crate doesn't support '\n' as a word boundary
cx.set_state(indoc! {"
«The quick brown
fox jumps over
@@ -3719,7 +3718,6 @@ async fn test_manipulate_text(cx: &mut TestAppContext) {
"});
// Test multiple line, single selection case
- // Test code hack that covers the fact that to_case crate doesn't support '\n' as a word boundary
cx.set_state(indoc! {"
«The quick brown
fox jumps over