Skip to content

Commit

Permalink
tweak: Fix some nightly clippy lints (#4691)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Jul 1, 2024
1 parent 8c4511e commit 2d0db5e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion prqlc/bindings/prqlc-python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ pub fn get_targets() -> Vec<String> {
prqlc_lib::Target::names()
}

#[cfg(not(feature = "extension-module"))]
#[cfg(test)]
mod test {
use insta::assert_snapshot;
Expand Down
2 changes: 1 addition & 1 deletion prqlc/prqlc-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version.workspace = true

[lib]
doctest = false
proc_macro = true
proc-macro = true
test = false

[dependencies]
Expand Down
6 changes: 1 addition & 5 deletions prqlc/prqlc/src/sql/gen_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,7 @@ pub(super) fn translate_query_sstring(
let string = translate_sstring(items, ctx)?;

let re = Regex::new(r"(?i)^SELECT\b").unwrap();
let prefix = if let Some(string) = string.trim().get(0..7) {
string
} else {
""
};
let prefix = string.trim().get(0..7).unwrap_or_default();

if re.is_match(prefix) {
if let Some(string) = string.trim().strip_prefix(prefix) {
Expand Down

0 comments on commit 2d0db5e

Please sign in to comment.