Skip to content

Commit 85aa7de

Browse files
Update src/escape.rs
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
1 parent a1c1655 commit 85aa7de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/escape.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub(crate) fn escape(s: &OsStr) -> Cow<'_, OsStr> {
3838
for &b in as_bytes {
3939
match b {
4040
b'\'' | b'!' => {
41+
escaped.reserve(4);
4142
escaped.push(b'\'');
4243
escaped.push(b'\\');
4344
escaped.push(b);

0 commit comments

Comments
 (0)