Merge pull request #1428 from gwenn/uninlined_format_args

Fix uninlined_format_args
This commit is contained in:
gwenn 2023-12-23 14:51:22 +01:00 committed by GitHub
commit fc738f3c0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View File

@ -34,7 +34,7 @@ fn main() -> Result<()> {
for person in rows {
match person {
Ok(p) => println!("ID: {}, Name: {}", p.id, p.name),
Err(e) => eprintln!("Error: {:?}", e),
Err(e) => eprintln!("Error: {e:?}"),
}
}

View File

@ -350,10 +350,7 @@ impl From<HeaderLocation> for String {
HeaderLocation::FromEnvironment => {
let prefix = env_prefix();
let mut header = env::var(format!("{prefix}_INCLUDE_DIR")).unwrap_or_else(|_| {
panic!(
"{}_INCLUDE_DIR must be set if {}_LIB_DIR is set",
prefix, prefix
)
panic!("{prefix}_INCLUDE_DIR must be set if {prefix}_LIB_DIR is set")
});
header.push_str(if cfg!(feature = "loadable_extension") {
"/sqlite3ext.h"

View File

@ -12,7 +12,7 @@ use sqlite3_parser::lexer::sql::Parser;
#[doc(hidden)]
#[proc_macro]
pub fn __bind(input: TokenStream) -> TokenStream {
try_bind(input).unwrap_or_else(|msg| parse_ts(&format!("compile_error!({:?})", msg)))
try_bind(input).unwrap_or_else(|msg| parse_ts(&format!("compile_error!({msg:?})")))
}
type Result<T> = std::result::Result<T, String>;