History

avoid temporary vec in favor of a `&'static [u8]`.

Sebastian Thiel committed 4 years ago

Commit 5a55dbf1 parent e36d83e1 file · +1 −3Browse files

Unified · Split

git-pathspec/src/parse.rs+1−3
@@ -58,9 +58,7 @@ impl Pattern { · 57 unmodified lines
58}58}
59 59
60fn parse_short_keywords(input: &[u8], cursor: &mut usize) -> Result<MagicSignature, Error> {60fn parse_short_keywords(input: &[u8], cursor: &mut usize) -> Result<MagicSignature, Error> {
61 let unimplemented_chars = vec![61 let unimplemented_chars = b"\"#%&'-',;<=>@_`~";
62 b'"', b'#', b'%', b'&', b'\'', b',', b'-', b';', b'<', b'=', b'>', b'@', b'_', b'`', b'~',
63 ];
64 62
65 let mut signature = MagicSignature::empty();63 let mut signature = MagicSignature::empty();
66 while let Some(&b) = input.get(*cursor) {64 while let Some(&b) = input.get(*cursor) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t