Merge MutableAppContext into AppContext

There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
This commit is contained in:
Nathan Sobo 2023-04-06 15:49:03 -06:00
parent dd00966cc6
commit de9bf6dfbd
112 changed files with 882 additions and 1041 deletions

View file

@ -2,7 +2,7 @@ use crate::{update_settings_file, watched_json::WatchedJsonFile, SettingsFileCon
use anyhow::Result;
use assets::Assets;
use fs::Fs;
use gpui::{AssetSource, MutableAppContext};
use gpui::{AppContext, AssetSource};
use std::{io::ErrorKind, path::Path, sync::Arc};
// TODO: Switch SettingsFile to open a worktree and buffer for synchronization
@ -49,7 +49,7 @@ impl SettingsFile {
}
pub fn update(
cx: &mut MutableAppContext,
cx: &mut AppContext,
update: impl 'static + Send + FnOnce(&mut SettingsFileContent),
) {
let this = cx.global::<SettingsFile>();
@ -211,7 +211,7 @@ mod tests {
}
fn assert_key_bindings_for<'a>(
cx: &mut MutableAppContext,
cx: &mut AppContext,
actions: Vec<(&'static str, &'a dyn Action)>,
line: u32,
) {