Browse Source

chore: Upgrade crates

merge-requests/1461/merge
Kévin Commaille 2 years ago
parent
commit
8e9ccbb93d
No known key found for this signature in database
GPG Key ID: 29A48C1F03620416
  1. 888
      Cargo.lock
  2. 10
      Cargo.toml
  3. 13
      src/secret/linux.rs
  4. 2
      src/session/model/user_sessions_list/mod.rs
  5. 6
      src/session/view/content/room_history/message_toolbar/completion/completion_popover.rs
  6. 2
      src/session_list/session_list_settings.rs

888
Cargo.lock generated

File diff suppressed because it is too large Load Diff

10
Cargo.toml

@ -35,7 +35,7 @@ indexmap = "2"
mime = "0.3"
mime_guess = "2"
once_cell = "1"
pulldown-cmark = "0.9"
pulldown-cmark = "0.10"
qrcode = "0.13"
rand = "0.8"
regex = "1"
@ -44,7 +44,7 @@ rqrr = "0.6"
secular = { version = "1", features = ["bmp", "normalization"] }
serde = "1"
serde_json = "1"
strum = { version = "0.25", features = ["derive"] }
strum = { version = "0.26", features = ["derive"] }
thiserror = "1"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "sync"] }
tracing = "0.1"
@ -99,13 +99,13 @@ features = [
# Linux-only dependencies.
[target.'cfg(target_os = "linux")'.dependencies]
ashpd = { version = "0.7", default-features = false, features = [
ashpd = { version = "0.8", default-features = false, features = [
"pipewire",
"tracing",
"tokio",
] }
oo7 = { version = "0.2", default-features = false, features = [
"native_crypto",
oo7 = { version = "0.3", default-features = false, features = [
"openssl_crypto",
"tokio",
"tracing",
] }

13
src/secret/linux.rs

@ -26,7 +26,7 @@ pub async fn restore_sessions() -> Result<Vec<StoredSession>, SecretError> {
keyring.unlock().await?;
let items = keyring
.search_items(HashMap::from([(SCHEMA_ATTRIBUTE, APP_ID)]))
.search_items(&HashMap::from([(SCHEMA_ATTRIBUTE, APP_ID)]))
.await?;
let mut sessions = Vec::with_capacity(items.len());
@ -79,8 +79,7 @@ pub async fn restore_sessions() -> Result<Vec<StoredSession>, SecretError> {
pub async fn store_session(session: StoredSession) -> Result<(), SecretError> {
let keyring = Keyring::new().await?;
let attrs = session.attributes();
let attributes = attrs.iter().map(|(k, v)| (*k, v.as_ref())).collect();
let attributes = session.attributes();
let secret = serde_json::to_string(&session.secret).unwrap();
keyring
@ -91,7 +90,7 @@ pub async fn store_session(session: StoredSession) -> Result<(), SecretError> {
"Fractal: Matrix credentials for {user_id}",
&[("user_id", session.user_id.as_str())],
),
attributes,
&attributes,
secret,
true,
)
@ -288,11 +287,7 @@ impl StoredSession {
/// Remove this session from the `SecretService`
async fn delete_from_secret_service(&self) -> Result<(), SecretError> {
let keyring = Keyring::new().await?;
let attrs = self.attributes();
let attributes = attrs.iter().map(|(k, v)| (*k, v.as_ref())).collect();
keyring.delete(attributes).await?;
keyring.delete(&self.attributes()).await?;
Ok(())
}

2
src/session/model/user_sessions_list/mod.rs

@ -258,7 +258,7 @@ impl UserSessionsList {
.into_iter()
.filter_map(|id| {
let data = match (
api_sessions.remove(&id),
api_sessions.shift_remove(&id),
crypto_sessions.as_ref().and_then(|s| s.get(&id)),
) {
(Some(api), Some(crypto)) => UserSessionData::Both { api, crypto },

6
src/session/view/content/room_history/message_toolbar/completion/completion_popover.rs

@ -437,8 +437,10 @@ impl CompletionPopover {
for (event, range) in Parser::new(&text).into_offset_iter() {
match event {
Event::Start(tag) => {
in_escaped_tag =
matches!(tag, Tag::CodeBlock(_) | Tag::Link(..) | Tag::Image(..));
in_escaped_tag = matches!(
tag,
Tag::CodeBlock(_) | Tag::Link { .. } | Tag::Image { .. }
);
}
Event::End(_) => {
// A link or a code block only contains text so an end tag

2
src/session_list/session_list_settings.rs

@ -102,7 +102,7 @@ impl SessionListSettings {
/// Remove the settings of the session with the given ID.
pub fn remove(&self, session_id: &str) {
self.imp().sessions.borrow_mut().remove(session_id);
self.imp().sessions.borrow_mut().shift_remove(session_id);
self.save();
}

Loading…
Cancel
Save