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:
parent
dd00966cc6
commit
de9bf6dfbd
112 changed files with 882 additions and 1041 deletions
|
@ -1,6 +1,6 @@
|
|||
use chrono::{Datelike, Local, NaiveTime, Timelike};
|
||||
use editor::{scroll::autoscroll::Autoscroll, Editor};
|
||||
use gpui::{actions, MutableAppContext};
|
||||
use gpui::{actions, AppContext};
|
||||
use settings::{HourFormat, Settings};
|
||||
use std::{
|
||||
fs::OpenOptions,
|
||||
|
@ -12,11 +12,11 @@ use workspace::AppState;
|
|||
|
||||
actions!(journal, [NewJournalEntry]);
|
||||
|
||||
pub fn init(app_state: Arc<AppState>, cx: &mut MutableAppContext) {
|
||||
pub fn init(app_state: Arc<AppState>, cx: &mut AppContext) {
|
||||
cx.add_global_action(move |_: &NewJournalEntry, cx| new_journal_entry(app_state.clone(), cx));
|
||||
}
|
||||
|
||||
pub fn new_journal_entry(app_state: Arc<AppState>, cx: &mut MutableAppContext) {
|
||||
pub fn new_journal_entry(app_state: Arc<AppState>, cx: &mut AppContext) {
|
||||
let settings = cx.global::<Settings>();
|
||||
let journal_dir = match journal_dir(&settings) {
|
||||
Some(journal_dir) => journal_dir,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue