aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-common/src
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@atuin.sh>2025-03-09 22:27:38 +0000
committerGitHub <noreply@github.com>2025-03-09 22:27:38 +0000
commit231d87c47ee2aebcb1cb85aad261e1d762e83da0 (patch)
treeb64046391f7cc43fa8f4d767061e208421b1c198 /crates/atuin-common/src
parentfix: don't save empty commands (#2605) (diff)
downloadatuin-231d87c47ee2aebcb1cb85aad261e1d762e83da0.zip
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<String> with Option<String>. They were not in hot loops, so a single clone is really no big deal + keeps things simpler. * fmt
Diffstat (limited to 'crates/atuin-common/src')
-rw-r--r--crates/atuin-common/src/utils.rs2
1 files changed, 1 insertions, 1 deletions
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<str> {
} 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]);