mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-01 02:23:20 +03:00
Remove remaining code associated with .zed.toml files
This commit is contained in:
parent
d7cba73ead
commit
054d697fb7
@ -5880,13 +5880,7 @@ mod tests {
|
||||
let host_language_registry = Arc::new(LanguageRegistry::test());
|
||||
|
||||
let fs = FakeFs::new(cx.background());
|
||||
fs.insert_tree(
|
||||
"/_collab",
|
||||
json!({
|
||||
".zed.toml": r#"collaborators = ["guest-1", "guest-2", "guest-3", "guest-4"]"#
|
||||
}),
|
||||
)
|
||||
.await;
|
||||
fs.insert_tree("/_collab", json!({"init": ""})).await;
|
||||
|
||||
let mut server = TestServer::start(cx.foreground(), cx.background()).await;
|
||||
let db = server.app_state.db.clone();
|
||||
|
@ -32,7 +32,6 @@ use postage::{
|
||||
prelude::{Sink as _, Stream as _},
|
||||
watch,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
use smol::channel::{self, Sender};
|
||||
use std::{
|
||||
any::Any,
|
||||
@ -64,7 +63,6 @@ pub enum Worktree {
|
||||
|
||||
pub struct LocalWorktree {
|
||||
snapshot: LocalSnapshot,
|
||||
config: WorktreeConfig,
|
||||
background_snapshot: Arc<Mutex<LocalSnapshot>>,
|
||||
last_scan_state_rx: watch::Receiver<ScanState>,
|
||||
_background_scanner_task: Option<Task<()>>,
|
||||
@ -143,11 +141,6 @@ struct ShareState {
|
||||
_maintain_remote_snapshot: Option<Task<Option<()>>>,
|
||||
}
|
||||
|
||||
#[derive(Default, Deserialize)]
|
||||
struct WorktreeConfig {
|
||||
collaborators: Vec<String>,
|
||||
}
|
||||
|
||||
pub enum Event {
|
||||
UpdatedEntries,
|
||||
}
|
||||
@ -460,13 +453,6 @@ impl LocalWorktree {
|
||||
.await
|
||||
.context("failed to stat worktree path")?;
|
||||
|
||||
let mut config = WorktreeConfig::default();
|
||||
if let Ok(zed_toml) = fs.load(&abs_path.join(".zed.toml")).await {
|
||||
if let Ok(parsed) = toml::from_str(&zed_toml) {
|
||||
config = parsed;
|
||||
}
|
||||
}
|
||||
|
||||
let (scan_states_tx, mut scan_states_rx) = mpsc::unbounded();
|
||||
let (mut last_scan_state_tx, last_scan_state_rx) = watch::channel_with(ScanState::Scanning);
|
||||
let tree = cx.add_model(move |cx: &mut ModelContext<Worktree>| {
|
||||
@ -496,7 +482,6 @@ impl LocalWorktree {
|
||||
|
||||
let tree = Self {
|
||||
snapshot: snapshot.clone(),
|
||||
config,
|
||||
background_snapshot: Arc::new(Mutex::new(snapshot)),
|
||||
last_scan_state_rx,
|
||||
_background_scanner_task: None,
|
||||
@ -544,10 +529,6 @@ impl LocalWorktree {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn authorized_logins(&self) -> Vec<String> {
|
||||
self.config.collaborators.clone()
|
||||
}
|
||||
|
||||
pub(crate) fn load_buffer(
|
||||
&mut self,
|
||||
path: &Path,
|
||||
@ -879,7 +860,6 @@ impl LocalWorktree {
|
||||
project_id,
|
||||
worktree_id: self.id().to_proto(),
|
||||
root_name: self.root_name().to_string(),
|
||||
authorized_logins: self.authorized_logins(),
|
||||
visible: self.visible,
|
||||
};
|
||||
let request = client.request(register_message);
|
||||
|
@ -151,8 +151,7 @@ message RegisterWorktree {
|
||||
uint64 project_id = 1;
|
||||
uint64 worktree_id = 2;
|
||||
string root_name = 3;
|
||||
repeated string authorized_logins = 4;
|
||||
bool visible = 5;
|
||||
bool visible = 4;
|
||||
}
|
||||
|
||||
message UnregisterWorktree {
|
||||
|
Loading…
Reference in New Issue
Block a user