From 231d87c47ee2aebcb1cb85aad261e1d762e83da0 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sun, 9 Mar 2025 22:27:38 +0000 Subject: chore: update rust toolchain to 1.85 (#2618) * chore: update rust toolchain to 1.85 * nix things * make clippy happy I've replaced a bunch of &Option with Option. They were not in hot loops, so a single clone is really no big deal + keeps things simpler. * fmt --- crates/atuin-common/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/atuin-common/src/utils.rs') diff --git a/crates/atuin-common/src/utils.rs b/crates/atuin-common/src/utils.rs index 7f156d77..fbf2ef82 100644 --- a/crates/atuin-common/src/utils.rs +++ b/crates/atuin-common/src/utils.rs @@ -146,7 +146,7 @@ pub trait Escapable: AsRef { } else { let mut remaining = self.as_ref(); // Not a perfect way to reserve space but should reduce the allocations - let mut buf = String::with_capacity(remaining.as_bytes().len()); + let mut buf = String::with_capacity(remaining.len()); while let Some(i) = remaining.find(|c: char| c.is_ascii_control()) { // safe to index with `..i`, `i` and `i+1..` as part[i] is a single byte ascii char buf.push_str(&remaining[..i]); -- cgit v1.3.1