Set up flow for mutating clients via explicit operation values

This commit is contained in:
Max Brunsfeld 2023-01-04 15:16:06 -08:00
parent ce8dd5a286
commit f243633f3e
3 changed files with 656 additions and 498 deletions

View file

@ -24,7 +24,7 @@ use std::{
cell::{Ref, RefCell, RefMut},
env,
ops::{Deref, DerefMut},
path::{Path, PathBuf},
path::Path,
sync::{
atomic::{AtomicBool, AtomicUsize, Ordering::SeqCst},
Arc,
@ -332,7 +332,6 @@ struct TestClientState {
local_projects: Vec<ModelHandle<Project>>,
remote_projects: Vec<ModelHandle<Project>>,
buffers: HashMap<ModelHandle<Project>, HashSet<ModelHandle<language::Buffer>>>,
next_root_dir_id: usize,
}
impl Deref for TestClient {
@ -483,15 +482,6 @@ impl TestClient {
)
})
}
fn create_new_root_dir(&self) -> PathBuf {
format!(
"/{}-root-{}",
self.username,
util::post_inc(&mut self.state.borrow_mut().next_root_dir_id)
)
.into()
}
}
impl Drop for TestClient {