Skip to content

Commit

Permalink
refactor: remove unnecessary string hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
hamirmahal committed Oct 7, 2024
1 parent 53fd4e9 commit efbb5c4
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 158 deletions.
10 changes: 5 additions & 5 deletions src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ mod tests {

#[test]
fn test_9() {
let string = r#"[ab] "#;
let string = r"[ab] ";
let tokenizer = Tokenizer::new(string);
let tokens: Vec<Token> = tokenizer.iter().collect();
assert_eq!(
Expand Down Expand Up @@ -491,7 +491,7 @@ mod tests {

#[test]
fn test_11() {
let string = r#" `a``b` "#;
let string = r" `a``b` ";
let tokenizer = Tokenizer::new(string);
let tokens: Vec<Token> = tokenizer.iter().collect();
assert_eq!(
Expand All @@ -510,7 +510,7 @@ mod tests {

#[test]
fn test_12() {
let string = r#" 'a''b' "#;
let string = r" 'a''b' ";
let tokenizer = Tokenizer::new(string);
let tokens: Vec<Token> = tokenizer.iter().collect();
assert_eq!(
Expand All @@ -529,7 +529,7 @@ mod tests {

#[test]
fn test_13() {
let string = r#"(?)"#;
let string = r"(?)";
let tokenizer = Tokenizer::new(string);
let tokens: Vec<Token> = tokenizer.iter().collect();
assert_eq!(
Expand All @@ -548,7 +548,7 @@ mod tests {

#[test]
fn test_14() {
let string = r#"($1 = $2)"#;
let string = r"($1 = $2)";
let tokenizer = Tokenizer::new(string);
let tokens: Vec<Token> = tokenizer.iter().collect();
assert_eq!(
Expand Down
6 changes: 3 additions & 3 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ mod tests {
#[cfg(feature = "backend-mysql")]
assert_eq!(
query.to_string(MysqlQueryBuilder),
r#"SELECT `hello-World_`"#
r"SELECT `hello-World_`"
);
#[cfg(feature = "backend-postgres")]
assert_eq!(
Expand All @@ -644,7 +644,7 @@ mod tests {
let query = Query::select().column(Alias::new("hel`lo")).to_owned();

#[cfg(feature = "backend-mysql")]
assert_eq!(query.to_string(MysqlQueryBuilder), r#"SELECT `hel``lo`"#);
assert_eq!(query.to_string(MysqlQueryBuilder), r"SELECT `hel``lo`");
#[cfg(feature = "backend-sqlite")]
assert_eq!(query.to_string(SqliteQueryBuilder), r#"SELECT "hel`lo""#);

Expand All @@ -659,7 +659,7 @@ mod tests {
let query = Query::select().column(Alias::new("hel``lo")).to_owned();

#[cfg(feature = "backend-mysql")]
assert_eq!(query.to_string(MysqlQueryBuilder), r#"SELECT `hel````lo`"#);
assert_eq!(query.to_string(MysqlQueryBuilder), r"SELECT `hel````lo`");
#[cfg(feature = "backend-sqlite")]
assert_eq!(query.to_string(SqliteQueryBuilder), r#"SELECT "hel``lo""#);

Expand Down
Loading

0 comments on commit efbb5c4

Please sign in to comment.