Skip to content

Commit 112c537

Browse files
committed
Avoid clone of table flag in statement Display
1 parent 8d431c2 commit 112c537

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/ast/mod.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -4490,15 +4490,10 @@ impl fmt::Display for Statement {
44904490
options,
44914491
query,
44924492
} => {
4493-
if table_flag.is_some() {
4494-
write!(
4495-
f,
4496-
"CACHE {table_flag} TABLE {table_name}",
4497-
table_flag = table_flag.clone().unwrap(),
4498-
table_name = table_name,
4499-
)?;
4493+
if let Some(table_flag) = table_flag {
4494+
write!(f, "CACHE {table_flag} TABLE {table_name}")?;
45004495
} else {
4501-
write!(f, "CACHE TABLE {table_name}",)?;
4496+
write!(f, "CACHE TABLE {table_name}")?;
45024497
}
45034498

45044499
if !options.is_empty() {

0 commit comments

Comments
 (0)