mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
chore: warnings be gone
This commit is contained in:
parent
7b0de55613
commit
5ff2166fa2
6 changed files with 10 additions and 14 deletions
|
@ -71,7 +71,7 @@ impl Handler for NeovimHandler {
|
||||||
sink.lock().await.replace(tx);
|
sink.lock().await.replace(tx);
|
||||||
let _worker = tokio::spawn(async move {
|
let _worker = tokio::spawn(async move {
|
||||||
let mut col : i64;
|
let mut col : i64;
|
||||||
let mut row : i64 = 0;
|
let mut row : i64;
|
||||||
let ns = neovim.create_namespace("Cursor").await.unwrap();
|
let ns = neovim.create_namespace("Cursor").await.unwrap();
|
||||||
while let Some(update) = rx.recv().await {
|
while let Some(update) = rx.recv().await {
|
||||||
neovim.exec_lua(format!("print('{:?}')", update).as_str(), vec![]).await.unwrap();
|
neovim.exec_lua(format!("print('{:?}')", update).as_str(), vec![]).await.unwrap();
|
||||||
|
|
|
@ -33,7 +33,7 @@ impl Drop for Buffer {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Buffer {
|
impl Buffer {
|
||||||
pub fn new(name: String, bus: broadcast::Sender<Event>) -> Self {
|
pub fn new(name: String, _bus: broadcast::Sender<Event>) -> Self {
|
||||||
let (op_tx, mut op_rx) = mpsc::channel(32);
|
let (op_tx, mut op_rx) = mpsc::channel(32);
|
||||||
let (stop_tx, stop_rx) = watch::channel(true);
|
let (stop_tx, stop_rx) = watch::channel(true);
|
||||||
let (content_tx, content_rx) = watch::channel(String::new());
|
let (content_tx, content_rx) = watch::channel(String::new());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
use std::{collections::HashMap, sync::Arc, fmt::Display};
|
use std::{collections::HashMap, sync::Arc};
|
||||||
use tokio::sync::{mpsc, watch};
|
use tokio::sync::{mpsc, watch};
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
|
@ -7,7 +7,7 @@ use library::{events::Event, user::{User, UserCursor}};
|
||||||
|
|
||||||
use crate::service::workspace::proto::CursorUpdate;
|
use crate::service::workspace::proto::CursorUpdate;
|
||||||
|
|
||||||
use super::{buffer::{BufferView, Buffer}};
|
use super::buffer::{BufferView, Buffer};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct UsersView {
|
pub struct UsersView {
|
||||||
|
@ -132,7 +132,7 @@ impl Workspace {
|
||||||
}
|
}
|
||||||
BufferAction::REMOVE { path } => {
|
BufferAction::REMOVE { path } => {
|
||||||
buffers.remove(&path);
|
buffers.remove(&path);
|
||||||
bus.send(Event::BufferDelete { path: path }).unwrap();
|
bus.send(Event::BufferDelete { path }).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tx.send(
|
tx.send(
|
||||||
|
|
|
@ -37,7 +37,7 @@ pub struct BufferService {
|
||||||
fn op_seq(_o: &Operation) -> OperationSeq {
|
fn op_seq(_o: &Operation) -> OperationSeq {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
fn op_net(_o: &OperationSeq) -> Operation {
|
fn _op_net(_o: &OperationSeq) -> Operation {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ fn op_net(_o: &OperationSeq) -> Operation {
|
||||||
async fn buffer_worker(
|
async fn buffer_worker(
|
||||||
bv: BufferView,
|
bv: BufferView,
|
||||||
mut client_rx: Streaming<Operation>,
|
mut client_rx: Streaming<Operation>,
|
||||||
tx_client: mpsc::Sender<Result<Operation, Status>>,
|
_tx_client: mpsc::Sender<Result<Operation, Status>>,
|
||||||
mut rx_core: broadcast::Receiver<Event>,
|
mut rx_core: broadcast::Receiver<Event>,
|
||||||
) {
|
) {
|
||||||
let mut queue: VecDeque<Operation> = VecDeque::new();
|
let mut queue: VecDeque<Operation> = VecDeque::new();
|
||||||
|
@ -67,7 +67,7 @@ async fn buffer_worker(
|
||||||
},
|
},
|
||||||
|
|
||||||
server_op = rx_core.recv() => {
|
server_op = rx_core.recv() => {
|
||||||
if let Ok(oop) = server_op {
|
if let Ok(_oop) = server_op {
|
||||||
let mut send_op = true;
|
let mut send_op = true;
|
||||||
for (i, _op) in queue.iter().enumerate() {
|
for (i, _op) in queue.iter().enumerate() {
|
||||||
if true { // TODO must compare underlying OperationSeq here! (op.equals(server_op))
|
if true { // TODO must compare underlying OperationSeq here! (op.equals(server_op))
|
||||||
|
|
|
@ -4,7 +4,7 @@ pub mod proto {
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use proto::{session_server::{Session}, WorkspaceBuilderRequest, SessionRequest, SessionResponse, WorkspaceList};
|
use proto::{session_server::Session, WorkspaceBuilderRequest, SessionResponse};
|
||||||
use tonic::{Request, Response, Status};
|
use tonic::{Request, Response, Status};
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,10 +14,6 @@ use crate::actor::{
|
||||||
|
|
||||||
use self::proto::session_server::SessionServer;
|
use self::proto::session_server::SessionServer;
|
||||||
|
|
||||||
use super::workspace::WorkspaceExtension;
|
|
||||||
|
|
||||||
use uuid::Uuid;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct SessionService {
|
pub struct SessionService {
|
||||||
state: Arc<StateManager>,
|
state: Arc<StateManager>,
|
||||||
|
@ -27,7 +23,7 @@ pub struct SessionService {
|
||||||
impl Session for SessionService {
|
impl Session for SessionService {
|
||||||
async fn create_workspace(
|
async fn create_workspace(
|
||||||
&self,
|
&self,
|
||||||
req: Request<WorkspaceBuilderRequest>,
|
_req: Request<WorkspaceBuilderRequest>,
|
||||||
) -> Result<Response<SessionResponse>, Status> {
|
) -> Result<Response<SessionResponse>, Status> {
|
||||||
// let name = req.extensions().get::<WorkspaceExtension>().unwrap().id.clone();
|
// let name = req.extensions().get::<WorkspaceExtension>().unwrap().id.clone();
|
||||||
let w = Workspace::new("im lazy".into());
|
let w = Workspace::new("im lazy".into());
|
||||||
|
|
Loading…
Reference in a new issue