Revert "Fixed all clippy warnings."

This reverts commit d1f3b847e3.
This commit is contained in:
Mohammad Dashti
2023-10-06 15:15:35 -07:00
parent 69fc1caca1
commit 2ceb33c6c2
16 changed files with 286 additions and 233 deletions

View File

@@ -92,7 +92,7 @@ impl<'a> Plugin for Intercept<'a> {
.map(|s| {
let s = s.as_str().to_string();
if s.is_empty() {
if s == "" {
None
} else {
Some(s)

View File

@@ -33,7 +33,6 @@ pub enum PluginOutput {
#[async_trait]
pub trait Plugin {
// Run before the query is sent to the server.
#[allow(clippy::ptr_arg)]
async fn run(
&mut self,
query_router: &QueryRouter,

View File

@@ -20,7 +20,7 @@ impl<'a> Prewarmer<'a> {
self.server.address(),
query
);
self.server.query(query).await?;
self.server.query(&query).await?;
}
Ok(())

View File

@@ -34,7 +34,7 @@ impl<'a> Plugin for TableAccess<'a> {
visit_relations(ast, |relation| {
let relation = relation.to_string();
let parts = relation.split('.').collect::<Vec<&str>>();
let parts = relation.split(".").collect::<Vec<&str>>();
let table_name = parts.last().unwrap();
if self.tables.contains(&table_name.to_string()) {