Skip to content

Commit

Permalink
chore: small clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benfdking committed Jul 29, 2024
1 parent aa67644 commit 6c0cba4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rust/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ async fn main_wrapped() -> Result<(), String> {
}
failed::Reason::Ran(results) => {
println!(" ran and returned results");
for result in &results.query_result {
while let Some(result) = &results.query_result {
println!(" {:?}", result.columns);
}
}
Expand Down
1 change: 1 addition & 0 deletions rust/core/src/databases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ pub trait SnapshotGenerator {
/// - `unique_key`: The column that uniquely identify each row in the snapshot source table.
/// - `strategy`: The snapshot strategy to be used (e.g., timestamp)
/// - `now`: The current timestamp to be used in the simulated query.
///
/// TODO Find a way to remove the &self parameter
fn generate_snapshot_query(
&self,
Expand Down
5 changes: 3 additions & 2 deletions rust/core/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ pub fn create_path_map(
/// - file1.sql
/// - file2.sql
/// - file3.snapshot.sql
///
/// The function would return a list of paths to file1.sql and file2.sql if the extension of
/// interest is 'sql' and the ignore suffix is 'snapshot.sql'.
pub(crate) async fn get_path_bufs(
Expand Down Expand Up @@ -1210,8 +1211,8 @@ fn parse_column_tests_for_model_or_source(
/// returned.
///
/// - `overrides` is a map of model name to the string that the reference should be replaced with if
/// a model is used that is found in overrides, then the reference will be replaced with a
/// `SELECT * FROM {found_value}` and any upstream references are dropped.
/// a model is used that is found in overrides, then the reference will be replaced with a
/// `SELECT * FROM {found_value}` and any upstream references are dropped.
///
/// For example, if the dependencies are A -> B -> C and overrides is {B: "D"} then the returned
/// A -> D.
Expand Down
4 changes: 2 additions & 2 deletions rust/core/src/project_to_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ pub async fn project_and_fs_to_query_sql_for_model_sql(
/// returned.
///
/// - `overrides` is a map of model name to the string that the reference should be replaced with if
/// a model is used that is found in overrides, then the reference will be replaced with a
/// `SELECT * FROM {found_value}` and any upstream references are dropped.
/// a model is used that is found in overrides, then the reference will be replaced with a
/// `SELECT * FROM {found_value}` and any upstream references are dropped.
///
/// For example, if the dependencies are A -> B -> C and overrides is {B: "D"} then the returned
/// A -> D.
Expand Down
2 changes: 1 addition & 1 deletion rust/dbt-converter/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ pub fn parse_dbt_project(
// write file to output director in /models/ and same path
let output_path = directory_to_write
.join("models")
.join(entry.path().strip_prefix(&models_path.clone()).unwrap());
.join(entry.path().strip_prefix(models_path.clone()).unwrap());
// read entry, pass it through translate_sql_file and paste
let reader = Cursor::new(
std::fs::read_to_string(entry.path())
Expand Down
2 changes: 1 addition & 1 deletion rust/quary-databases/src/databases_clickhouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ ORDER BY position;",
))
}

async fn table_exists(&self, path: &str) -> Result<Option<bool>, String> {
async fn table_exists(&self, _path: &str) -> Result<Option<bool>, String> {
Ok(None)
}
}
Expand Down

0 comments on commit 6c0cba4

Please sign in to comment.