Skip to content

Commit

Permalink
style(sql): satisfy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
loyd committed Sep 27, 2023
1 parent 3fc12f6 commit b35d313
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sql/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ fn escape(src: &str, mut dst: impl fmt::Write, ch: char) -> fmt::Result {
#[test]
fn it_escapes_string() {
let mut actual = String::new();
string(r#"f\o'o '' b\'ar'"#, &mut actual).unwrap();
assert_eq!(actual, r#"'f\\o\'o \'\' b\\\'ar\''"#);
string(r"f\o'o '' b\'ar'", &mut actual).unwrap();
assert_eq!(actual, r"'f\\o\'o \'\' b\\\'ar\''");
}

#[test]
fn it_escapes_identifier() {
let mut actual = String::new();
identifier(r#"f\o`o `` b\`ar`"#, &mut actual).unwrap();
assert_eq!(actual, r#"`f\\o\`o \`\` b\\\`ar\``"#);
identifier(r"f\o`o `` b\`ar`", &mut actual).unwrap();
assert_eq!(actual, r"`f\\o\`o \`\` b\\\`ar\``");
}

0 comments on commit b35d313

Please sign in to comment.