mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-25 02:21:37 +08:00
Fix uninlined_format_args
cargo clippy --all --all-targets --fix -- -Wclippy::uninlined_format_args
This commit is contained in:
parent
6663dac933
commit
3c3d7daeb4
@ -34,7 +34,7 @@ fn main() -> Result<()> {
|
|||||||
for person in rows {
|
for person in rows {
|
||||||
match person {
|
match person {
|
||||||
Ok(p) => println!("ID: {}, Name: {}", p.id, p.name),
|
Ok(p) => println!("ID: {}, Name: {}", p.id, p.name),
|
||||||
Err(e) => eprintln!("Error: {:?}", e),
|
Err(e) => eprintln!("Error: {e:?}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,10 +350,7 @@ impl From<HeaderLocation> for String {
|
|||||||
HeaderLocation::FromEnvironment => {
|
HeaderLocation::FromEnvironment => {
|
||||||
let prefix = env_prefix();
|
let prefix = env_prefix();
|
||||||
let mut header = env::var(format!("{prefix}_INCLUDE_DIR")).unwrap_or_else(|_| {
|
let mut header = env::var(format!("{prefix}_INCLUDE_DIR")).unwrap_or_else(|_| {
|
||||||
panic!(
|
panic!("{prefix}_INCLUDE_DIR must be set if {prefix}_LIB_DIR is set")
|
||||||
"{}_INCLUDE_DIR must be set if {}_LIB_DIR is set",
|
|
||||||
prefix, prefix
|
|
||||||
)
|
|
||||||
});
|
});
|
||||||
header.push_str(if cfg!(feature = "loadable_extension") {
|
header.push_str(if cfg!(feature = "loadable_extension") {
|
||||||
"/sqlite3ext.h"
|
"/sqlite3ext.h"
|
||||||
|
@ -12,7 +12,7 @@ use sqlite3_parser::lexer::sql::Parser;
|
|||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[proc_macro]
|
#[proc_macro]
|
||||||
pub fn __bind(input: TokenStream) -> TokenStream {
|
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>;
|
type Result<T> = std::result::Result<T, String>;
|
||||||
|
Loading…
Reference in New Issue
Block a user