From 5944e074845e2bd5097fac93ffb437442e7352cf Mon Sep 17 00:00:00 2001 From: Anton Harniakou Date: Fri, 6 Jun 2025 17:08:49 +0300 Subject: [PATCH] Use eq_ignore_ascii_case --- cli/app.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/app.rs b/cli/app.rs index 46a4706c0..a403aa591 100644 --- a/cli/app.rs +++ b/cli/app.rs @@ -425,8 +425,8 @@ impl Limbo { }; // TODO this is a quickfix. Some ideas to do case insensitive comparisons is to use // Uncased or Unicase. - let temp = input.to_lowercase(); - if temp.trim_start().starts_with("explain") { + let explain_str = "explain"; + if input.trim_start()[0..explain_str.len()].eq_ignore_ascii_case(explain_str) { match self.conn.query(input) { Ok(Some(stmt)) => { let _ = self.writeln(stmt.explain().as_bytes());