mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
chore(cli/cache): fewer string allocations (#17549)
This commit is contained in:
parent
7f38f30a5c
commit
1a1faff2f6
4 changed files with 7 additions and 7 deletions
4
cli/cache/node.rs
vendored
4
cli/cache/node.rs
vendored
|
@ -253,7 +253,7 @@ impl NodeAnalysisCacheInner {
|
|||
let mut stmt = self.conn.prepare_cached(sql)?;
|
||||
stmt.execute(params![
|
||||
specifier,
|
||||
&source_hash.to_string(),
|
||||
&source_hash,
|
||||
&serde_json::to_string(top_level_decls)?,
|
||||
])?;
|
||||
Ok(())
|
||||
|
@ -304,7 +304,7 @@ fn create_tables(conn: &Connection, cli_version: &str) -> Result<(), AnyError> {
|
|||
|row| row.get(0),
|
||||
)
|
||||
.ok();
|
||||
if data_cli_version != Some(cli_version.to_string()) {
|
||||
if data_cli_version.as_deref() != Some(cli_version) {
|
||||
conn.execute("DELETE FROM cjsanalysiscache", params![])?;
|
||||
conn.execute("DELETE FROM esmglobalscache", params![])?;
|
||||
let mut stmt = conn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue