mirror of
https://github.com/pcvolkmer/arsnova-client.git
synced 2025-04-19 11:06:51 +00:00
chore: cleanup imports
This commit is contained in:
parent
ba8dd91af9
commit
320fe0fa97
@ -32,7 +32,7 @@ use ratatui::text::{Line, Span};
|
||||
use ratatui::widgets::Paragraph;
|
||||
use ratatui::Terminal;
|
||||
use tokio::select;
|
||||
use tokio::sync::mpsc::Receiver;
|
||||
use tokio::sync::mpsc::{channel, Receiver};
|
||||
|
||||
use arsnova_client::{Client, Feedback, FeedbackHandler};
|
||||
|
||||
@ -69,7 +69,7 @@ async fn main() -> Result<(), ()> {
|
||||
let mut terminal = Terminal::new(CrosstermBackend::new(stdout())).map_err(|_| ())?;
|
||||
terminal.clear().map_err(|_| ())?;
|
||||
|
||||
let (tx, rx) = tokio::sync::mpsc::channel::<Feedback>(10);
|
||||
let (tx, rx) = channel::<Feedback>(10);
|
||||
|
||||
let l1 = client.on_feedback_changed(&cli.room, FeedbackHandler::Sender(tx.clone()));
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use std::fmt::Display;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::time::Duration;
|
||||
|
||||
use futures_util::{SinkExt, StreamExt};
|
||||
@ -57,7 +57,7 @@ impl WsConnectMessage {
|
||||
}
|
||||
|
||||
impl Display for WsConnectMessage {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
let str = format!(
|
||||
"CONNECT\ntoken:{}\naccept-version:1.2,1.1,1.0\nheart-beat:20000,0\n\n\0",
|
||||
self.token
|
||||
@ -113,7 +113,7 @@ impl WsFeedbackPayload {
|
||||
}
|
||||
|
||||
impl Display for WsSubscribeMessage {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
let str = format!(
|
||||
"SUBSCRIBE\nid:sub-6\ndestination:/topic/{}.feedback.stream\n\n\0",
|
||||
self.room_id
|
||||
|
Loading…
x
Reference in New Issue
Block a user