remove any trace of capnp
This commit is contained in:
38
Cargo.lock
generated
38
Cargo.lock
generated
@ -459,36 +459,6 @@ dependencies = [
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "capnp"
|
||||
version = "0.18.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "384b671a5b39eadb909b0c2b81d22a400d446526e651e64be9eb6674b33644a4"
|
||||
dependencies = [
|
||||
"embedded-io",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "capnp-futures"
|
||||
version = "0.18.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8697b857f5b014ff378f02817426d3b6fb90a69f32e330fe010f24fe10cf8f1"
|
||||
dependencies = [
|
||||
"capnp",
|
||||
"futures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "capnp-rpc"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94b87a9e0f74600628e227d39b79ef8652c558a408999ac46ba22b19dbad0010"
|
||||
dependencies = [
|
||||
"capnp",
|
||||
"capnp-futures",
|
||||
"futures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cbc"
|
||||
version = "0.1.2"
|
||||
@ -693,12 +663,6 @@ dependencies = [
|
||||
"syn 2.0.87",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embedded-io"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "658bbadc628dc286b9ae02f0cb0f5411c056eb7487b72f0083203f115de94060"
|
||||
|
||||
[[package]]
|
||||
name = "encoding_rs"
|
||||
version = "0.8.35"
|
||||
@ -1907,8 +1871,6 @@ dependencies = [
|
||||
"anyhow",
|
||||
"ashpd",
|
||||
"async-channel",
|
||||
"capnp",
|
||||
"capnp-rpc",
|
||||
"chrono",
|
||||
"futures",
|
||||
"gettext-rs",
|
||||
|
||||
@ -23,8 +23,6 @@ tracing-subscriber = "0.3"
|
||||
adw = { version = "0.7", package = "libadwaita", features = ["v1_6"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
capnp = "0.18.0"
|
||||
capnp-rpc = "0.18.0"
|
||||
anyhow = "1.0.71"
|
||||
chrono = "0.4.26"
|
||||
rand = "0.8.5"
|
||||
|
||||
@ -37,17 +37,6 @@
|
||||
]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"name": "capnp",
|
||||
"buildsystem": "cmake",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://capnproto.org/capnproto-c++-0.10.4.tar.gz",
|
||||
"sha256": "981e7ef6dbe3ac745907e55a78870fbb491c5d23abd4ebc04e20ec235af4458c"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "blueprint-compiler",
|
||||
"buildsystem": "meson",
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
use std::cell::{Cell, OnceCell, RefCell};
|
||||
use std::future::Future;
|
||||
use std::rc::Rc;
|
||||
|
||||
use adw::prelude::*;
|
||||
use capnp::capability::Promise;
|
||||
use glib::subclass::prelude::*;
|
||||
use glib::Properties;
|
||||
use gtk::{gio, glib};
|
||||
@ -137,9 +137,9 @@ impl Subscription {
|
||||
self._set_display_name(display_name.to_string());
|
||||
}
|
||||
|
||||
fn load(&self) -> Promise<(), capnp::Error> {
|
||||
fn load(&self) -> impl Future<Output = anyhow::Result<()>> {
|
||||
let this = self.clone();
|
||||
Promise::from_future(async move {
|
||||
async move {
|
||||
let remote_subscription = this.imp().client.get().unwrap();
|
||||
let model = remote_subscription.model().await;
|
||||
|
||||
@ -161,7 +161,7 @@ impl Subscription {
|
||||
this.handle_event(ev);
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_event(&self, ev: ListenerEvent) {
|
||||
@ -198,13 +198,13 @@ impl Subscription {
|
||||
self.notify_display_name();
|
||||
}
|
||||
#[instrument(skip_all)]
|
||||
pub fn set_display_name(&self, value: String) -> Promise<(), anyhow::Error> {
|
||||
pub fn set_display_name(&self, value: String) -> impl Future<Output = anyhow::Result<()>> {
|
||||
let this = self.clone();
|
||||
Promise::from_future(async move {
|
||||
async move {
|
||||
this._set_display_name(value);
|
||||
this.send_updated_info().await?;
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async fn send_updated_info(&self) -> anyhow::Result<()> {
|
||||
@ -240,14 +240,14 @@ impl Subscription {
|
||||
self.notify_unread_count();
|
||||
}
|
||||
|
||||
pub fn set_muted(&self, value: bool) -> Promise<(), anyhow::Error> {
|
||||
pub fn set_muted(&self, value: bool) -> impl Future<Output = anyhow::Result<()>> {
|
||||
let this = self.clone();
|
||||
Promise::from_future(async move {
|
||||
async move {
|
||||
this.imp().muted.replace(value);
|
||||
this.notify_muted();
|
||||
this.send_updated_info().await?;
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
}
|
||||
pub async fn flag_all_as_read(&self) -> anyhow::Result<()> {
|
||||
let imp = self.imp();
|
||||
|
||||
@ -182,7 +182,7 @@ impl AdvancedMessageDialog {
|
||||
&mut buffer.start_iter(),
|
||||
&mut buffer.end_iter(),
|
||||
true,
|
||||
)).map_err(|e| capnp::Error::failed(e.to_string()))?;
|
||||
))?;
|
||||
thisc.imp().subscription.get().unwrap()
|
||||
.publish_msg(msg).await
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user