diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-12-04 13:52:22 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-12-04 13:52:22 +0200 |
| commit | c82a3bcdac78bafbe7d7e686e083562253fd04d2 (patch) | |
| tree | 57f7ad151fa7d94b9c204446be8f9133833b9f85 /src/main.rs | |
| parent | fd4049183f9e86e061c8fe440c133451116fc7e2 (diff) | |
| download | rex-c82a3bcdac78bafbe7d7e686e083562253fd04d2.tar.xz rex-c82a3bcdac78bafbe7d7e686e083562253fd04d2.zip | |
Removed Uncessary String and replaced them with &str
Diffstat (limited to 'src/main.rs')
| -rwxr-xr-x | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 0f64a7e..b6033c1 100755 --- a/src/main.rs +++ b/src/main.rs @@ -4,9 +4,9 @@ use nfa::*; use regex::*; fn test(regex: &str, input: &str) -> bool { - let regex = Regex::new(String::from(regex)); + let regex = Regex::new(regex); let nfa = NFA::from(regex); - nfa.matches(String::from(input)) + nfa.matches(input) } fn main() { |
