Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Factor out key name

Joseph T. Lyonsc0fb98cb3fee
diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs
index 5f362d1d310..5d94622d475 100644
--- a/crates/zed/src/main.rs
+++ b/crates/zed/src/main.rs
@@ -271,13 +271,15 @@ fn main() {
}
async fn installation_id() -> Result<String> {
- if let Ok(Some(installation_id)) = KEY_VALUE_STORE.read_kvp("device_id") {
+ let legacy_key_name = "device_id";
+
+ if let Ok(Some(installation_id)) = KEY_VALUE_STORE.read_kvp(legacy_key_name) {
Ok(installation_id)
} else {
let installation_id = Uuid::new_v4().to_string();
KEY_VALUE_STORE
- .write_kvp("device_id".to_string(), installation_id.clone())
+ .write_kvp(legacy_key_name.to_string(), installation_id.clone())
.await?;
Ok(installation_id)