mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Revert "Panic in debug if global settings can't be deserialized from defaults"
This reverts commit 7a051a0dcb
.
This commit is contained in:
parent
00e37bc2a2
commit
c5b3785be5
@ -147,28 +147,25 @@ impl SettingsStore {
|
||||
local_values: Vec::new(),
|
||||
}));
|
||||
|
||||
let default_settings = setting_value
|
||||
if let Some(default_settings) = setting_value
|
||||
.deserialize_setting(&self.raw_default_settings)
|
||||
.expect("can't deserialize default settings");
|
||||
|
||||
let mut user_values_stack = Vec::new();
|
||||
if let Some(user_settings) = setting_value
|
||||
.deserialize_setting(&self.raw_user_settings)
|
||||
.log_err()
|
||||
{
|
||||
user_values_stack = vec![user_settings];
|
||||
}
|
||||
let mut user_values_stack = Vec::new();
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
setting_value
|
||||
.load_setting(&default_settings, &[], cx)
|
||||
.expect("can't deserialize settings from defaults");
|
||||
if let Some(user_settings) = setting_value
|
||||
.deserialize_setting(&self.raw_user_settings)
|
||||
.log_err()
|
||||
{
|
||||
user_values_stack = vec![user_settings];
|
||||
}
|
||||
|
||||
if let Some(setting) = setting_value
|
||||
.load_setting(&default_settings, &user_values_stack, cx)
|
||||
.log_err()
|
||||
{
|
||||
setting_value.set_global_value(setting);
|
||||
if let Some(setting) = setting_value
|
||||
.load_setting(&default_settings, &user_values_stack, cx)
|
||||
.log_err()
|
||||
{
|
||||
setting_value.set_global_value(setting);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user