Skip to content

Commit

Permalink
As per clippy use vars directly in format! strings
Browse files Browse the repository at this point in the history
  • Loading branch information
gruuya committed Jan 26, 2023
1 parent cc6b0e0 commit 21e76c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions datafusion/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,7 @@ impl ConfigField for ConfigOptions {
"optimizer" => self.optimizer.set(rem, value),
"explain" => self.explain.set(rem, value),
_ => Err(DataFusionError::Internal(format!(
"Config value \"{}\" not found on ConfigOptions",
key
"Config value \"{key}\" not found on ConfigOptions"
))),
}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/common/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl Display for DataFusionError {
}
#[cfg(feature = "avro")]
DataFusionError::AvroError(ref desc) => {
write!(f, "Avro error: {}", desc)
write!(f, "Avro error: {desc}")
}
DataFusionError::IoError(ref desc) => write!(f, "IO error: {desc}"),
DataFusionError::SQL(ref desc) => {
Expand Down
4 changes: 2 additions & 2 deletions datafusion/common/src/pyarrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ mod tests {
let python_path: Vec<&str> =
locals.get_item("python_path").unwrap().extract().unwrap();

panic!("pyarrow not found\nExecutable: {}\nPython path: {:?}\n\
panic!("pyarrow not found\nExecutable: {executable}\nPython path: {:?}\n\
HINT: try `pip install pyarrow`\n\
NOTE: On Mac OS, you must compile against a Framework Python \
(default in python.org installers and brew, but not pyenv)\n\
NOTE: On Mac OS, PYO3 might point to incorrect Python library \
path when using virtual environments. Try \
`export PYTHONPATH=$(python -c \"import sys; print(sys.path[-1])\")`\n",
executable, python_path)
python_path)
}
})
}
Expand Down

0 comments on commit 21e76c4

Please sign in to comment.