mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +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/parsed_source.rs
vendored
4
cli/cache/parsed_source.rs
vendored
|
@ -219,7 +219,7 @@ impl ParsedSourceCacheModuleAnalyzer {
|
|||
stmt.execute(params![
|
||||
specifier.as_str(),
|
||||
&media_type.to_string(),
|
||||
&source_hash.to_string(),
|
||||
&source_hash,
|
||||
&serde_json::to_string(&module_info)?,
|
||||
])?;
|
||||
Ok(())
|
||||
|
@ -298,7 +298,7 @@ fn create_tables(
|
|||
|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 moduleinfocache", params![])?;
|
||||
let mut stmt = conn
|
||||
.prepare("INSERT OR REPLACE INTO info (key, value) VALUES (?1, ?2)")?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue