Skip to content

Commit

Permalink
Remove unused imports on rust side
Browse files Browse the repository at this point in the history
  • Loading branch information
bitfriend committed Dec 25, 2024
1 parent 847c7da commit c27e5de
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 54 deletions.
3 changes: 1 addition & 2 deletions native/acter/src/api/deep_linking.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::{Client, RUNTIME};
use acter_core::events::RefDetails;
use acter_core::share_link::api;
use acter_core::{events::RefDetails, share_link::api};
use anyhow::Result;

impl Client {
Expand Down
4 changes: 2 additions & 2 deletions native/acter/src/api/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use futures::{
pin_mut,
stream::{Stream, StreamExt},
};
use matrix_sdk::{executor::JoinHandle, Client as SdkClient};
use matrix_sdk_base::ruma::{OwnedDeviceId, OwnedUserId};
use matrix_sdk::Client as SdkClient;
use matrix_sdk_base::{executor::JoinHandle, ruma::OwnedDeviceId};
use std::{
marker::Unpin,
sync::Arc,
Expand Down
12 changes: 7 additions & 5 deletions native/acter/src/api/invitation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ use futures_signals::signal::{Mutable, MutableSignalCloned, SignalExt, SignalStr
use matrix_sdk::{
event_handler::{Ctx, EventHandlerHandle},
room::{Room, RoomMember},
RoomMemberships, RoomState,
};
use matrix_sdk_base::ruma::{
api::client::user_directory::search_users,
events::room::member::{MembershipState, StrippedRoomMemberEvent, SyncRoomMemberEvent},
OwnedRoomId, OwnedUserId, RoomId,
use matrix_sdk_base::{
ruma::{
api::client::user_directory::search_users,
events::room::member::{MembershipState, StrippedRoomMemberEvent, SyncRoomMemberEvent},
OwnedRoomId, OwnedUserId, RoomId,
},
RoomMemberships, RoomState,
};
use std::{
collections::BTreeMap,
Expand Down
1 change: 0 additions & 1 deletion native/acter/src/api/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use matrix_sdk_ui::timeline::{
EventSendState as SdkEventSendState, EventTimelineItem, MembershipChange, TimelineEventItemId,
TimelineItem, TimelineItemContent, TimelineItemKind, VirtualTimelineItem,
};
use ruma::TransactionId;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use tracing::info;
Expand Down
12 changes: 7 additions & 5 deletions native/acter/src/api/news.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ use acter_core::{
};
use anyhow::{bail, Context, Result};
use futures::stream::StreamExt;
use matrix_sdk::{room::Room, RoomState};
use matrix_sdk_base::ruma::{
events::{room::message::MessageType, MessageLikeEventType},
OwnedEventId, OwnedRoomId, OwnedUserId,
use matrix_sdk::room::Room;
use matrix_sdk_base::{
ruma::{
events::{room::message::MessageType, MessageLikeEventType},
OwnedEventId, OwnedRoomId, OwnedUserId,
},
RoomState,
};
use std::{
any::Any,
collections::{hash_map::Entry, HashMap},
ops::Deref,
};
Expand Down
13 changes: 8 additions & 5 deletions native/acter/src/api/pins.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
use acter_core::{
events::{
pins::{self, PinBuilder},
Display, Icon, RefDetails, RefPreview,
Display, RefDetails, RefPreview,
},
models::{self, can_redact, ActerModel, AnyActerModel},
statics::KEYS,
};
use anyhow::{bail, Result};
use futures::stream::StreamExt;
use matrix_sdk::{room::Room, RoomState};
use matrix_sdk_base::ruma::{
events::{room::message::TextMessageEventContent, MessageLikeEventType},
OwnedEventId, OwnedRoomId, OwnedUserId,
use matrix_sdk::room::Room;
use matrix_sdk_base::{
ruma::{
events::{room::message::TextMessageEventContent, MessageLikeEventType},
OwnedEventId, OwnedRoomId, OwnedUserId,
},
RoomState,
};
use std::{
collections::{hash_map::Entry, HashMap},
Expand Down
11 changes: 4 additions & 7 deletions native/acter/src/api/profile.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
use anyhow::Result;
use matrix_sdk::{
use matrix_sdk::{room::RoomMember, Client};
use matrix_sdk_base::{
media::{MediaFormat, MediaRequestParameters},
room::RoomMember,
Client, Room,
};
use matrix_sdk_base::ruma::{
api::client::user_directory::search_users, events::room::MediaSource, OwnedRoomId, OwnedUserId,
ruma::{api::client::user_directory::search_users, events::room::MediaSource, OwnedUserId},
};

use super::{
common::{OptionBuffer, OptionString, ThumbnailSize},
common::{OptionBuffer, ThumbnailSize},
RUNTIME,
};

Expand Down
31 changes: 17 additions & 14 deletions native/acter/src/api/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,26 @@ use anyhow::{bail, Context, Result};
use derive_builder::Builder;
use futures::stream::StreamExt;
use matrix_sdk::notification_settings::{
IsEncrypted, IsOneToOne, NotificationSettings as SdkNotificationSettings, RoomNotificationMode,
IsEncrypted, IsOneToOne, NotificationSettings as SdkNotificationSettings,
};
use matrix_sdk_base::ruma::{
api::client::{
device,
push::{
get_pushers, get_pushrules_all, set_pusher, set_pushrule, EmailPusherData,
Pusher as RumaPusher, PusherIds, PusherInit, PusherKind,
use matrix_sdk_base::{
notification_settings::RoomNotificationMode,
ruma::{
api::client::{
device,
push::{
get_pushers, get_pushrules_all, set_pusher, set_pushrule, EmailPusherData,
Pusher as RumaPusher, PusherIds, PusherInit, PusherKind,
},
},
assign,
events::{
room::{message::MessageType, MediaSource},
AnySyncMessageLikeEvent, AnySyncTimelineEvent, MessageLikeEvent, SyncMessageLikeEvent,
},
push::{HttpPusherData, PushFormat, RuleKind, Ruleset},
EventId, OwnedMxcUri, OwnedRoomId, RoomId,
},
assign,
events::{
room::{message::MessageType, MediaSource},
AnySyncMessageLikeEvent, AnySyncTimelineEvent, MessageLikeEvent, SyncMessageLikeEvent,
},
push::{HttpPusherData, PushFormat, RuleKind, Ruleset},
EventId, OwnedMxcUri, OwnedRoomId, RoomId,
};
use matrix_sdk_ui::notification_client::{
NotificationClient, NotificationEvent, NotificationItem as SdkNotificationItem,
Expand Down
3 changes: 1 addition & 2 deletions native/acter/src/api/reactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use anyhow::{bail, Result};
use futures::stream::StreamExt;
use matrix_sdk::room::Room;
use matrix_sdk_base::ruma::{
events::{reaction::ReactionEvent, MessageLikeEventType},
OwnedEventId, OwnedTransactionId, OwnedUserId, UserId,
events::MessageLikeEventType, OwnedEventId, OwnedTransactionId, OwnedUserId, UserId,
};
use std::ops::Deref;
use tokio::sync::broadcast::Receiver;
Expand Down
14 changes: 3 additions & 11 deletions native/acter/src/api/read_receipts.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
use acter_core::models::{self, ActerModel, AnyActerModel};
use anyhow::{bail, Result};
use acter_core::models;
use anyhow::Result;
use futures::stream::StreamExt;
use matrix_sdk::room::Room;
use matrix_sdk::ruma::api::client::receipt::create_receipt::v3::ReceiptType;
use matrix_sdk_base::ruma::{
events::{
receipt::{Receipt, ReceiptThread, SyncReceiptEvent},
MessageLikeEventType,
},
OwnedEventId, OwnedTransactionId, OwnedUserId, UserId,
};
use std::{collections::BTreeMap, ops::Deref};
use matrix_sdk_base::ruma::OwnedEventId;
use tokio::sync::broadcast::Receiver;
use tokio_stream::{wrappers::BroadcastStream, Stream};

Expand Down

0 comments on commit c27e5de

Please sign in to comment.