Merge branch 'main' into panels
This commit is contained in:
commit
6d16d2224d
3 changed files with 27 additions and 10 deletions
|
@ -1170,7 +1170,7 @@ mod tests {
|
|||
}
|
||||
|
||||
fn mtime(&self) -> std::time::SystemTime {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn path(&self) -> &Arc<Path> {
|
||||
|
@ -1178,23 +1178,23 @@ mod tests {
|
|||
}
|
||||
|
||||
fn full_path(&self, _: &AppContext) -> PathBuf {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn file_name<'a>(&'a self, _: &'a AppContext) -> &'a std::ffi::OsStr {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn is_deleted(&self) -> bool {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn std::any::Any {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn to_proto(&self) -> rpc::proto::File {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1204,7 +1204,7 @@ mod tests {
|
|||
}
|
||||
|
||||
fn load(&self, _: &AppContext) -> Task<Result<String>> {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn buffer_reloaded(
|
||||
|
@ -1216,7 +1216,7 @@ mod tests {
|
|||
_: std::time::SystemTime,
|
||||
_: &mut AppContext,
|
||||
) {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3963,6 +3963,15 @@ impl Drop for AnyViewHandle {
|
|||
}
|
||||
}
|
||||
|
||||
impl Debug for AnyViewHandle {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("AnyViewHandle")
|
||||
.field("window_id", &self.window_id)
|
||||
.field("view_id", &self.view_id)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AnyModelHandle {
|
||||
model_id: usize,
|
||||
model_type: TypeId,
|
||||
|
@ -4072,12 +4081,20 @@ impl AnyWeakModelHandle {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy)]
|
||||
#[derive(Copy)]
|
||||
pub struct WeakViewHandle<T> {
|
||||
any_handle: AnyWeakViewHandle,
|
||||
view_type: PhantomData<T>,
|
||||
}
|
||||
|
||||
impl<T> Debug for WeakViewHandle<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct(&format!("WeakViewHandle<{}>", type_name::<T>()))
|
||||
.field("any_handle", &self.any_handle)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> WeakHandle for WeakViewHandle<T> {
|
||||
fn id(&self) -> usize {
|
||||
self.view_id
|
||||
|
|
|
@ -194,7 +194,7 @@ impl SerializedPane {
|
|||
let pane_handle = pane_handle
|
||||
.upgrade(cx)
|
||||
.ok_or_else(|| anyhow!("pane was dropped"))?;
|
||||
Pane::add_item(workspace, &pane_handle, item_handle, false, false, None, cx);
|
||||
Pane::add_item(workspace, &pane_handle, item_handle, true, true, None, cx);
|
||||
anyhow::Ok(())
|
||||
})??;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue