chore: warnings be gone

This commit is contained in:
əlemi 2022-10-18 02:28:16 +02:00
parent 7b0de55613
commit 5ff2166fa2
6 changed files with 10 additions and 14 deletions

View file

@ -71,7 +71,7 @@ impl Handler for NeovimHandler {
sink.lock().await.replace(tx);
let _worker = tokio::spawn(async move {
let mut col : i64;
let mut row : i64 = 0;
let mut row : i64;
let ns = neovim.create_namespace("Cursor").await.unwrap();
while let Some(update) = rx.recv().await {
neovim.exec_lua(format!("print('{:?}')", update).as_str(), vec![]).await.unwrap();

View file

@ -33,7 +33,7 @@ impl Drop for 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 (stop_tx, stop_rx) = watch::channel(true);
let (content_tx, content_rx) = watch::channel(String::new());

View file

@ -1,5 +1,5 @@
use std::{collections::HashMap, sync::Arc, fmt::Display};
use std::{collections::HashMap, sync::Arc};
use tokio::sync::{mpsc, watch};
use tracing::error;
use uuid::Uuid;

View file

@ -7,7 +7,7 @@ use library::{events::Event, user::{User, UserCursor}};
use crate::service::workspace::proto::CursorUpdate;
use super::{buffer::{BufferView, Buffer}};
use super::buffer::{BufferView, Buffer};
#[derive(Debug, Clone)]
pub struct UsersView {
@ -132,7 +132,7 @@ impl Workspace {
}
BufferAction::REMOVE { path } => {
buffers.remove(&path);
bus.send(Event::BufferDelete { path: path }).unwrap();
bus.send(Event::BufferDelete { path }).unwrap();
}
}
tx.send(

View file

@ -37,7 +37,7 @@ pub struct BufferService {
fn op_seq(_o: &Operation) -> OperationSeq {
todo!()
}
fn op_net(_o: &OperationSeq) -> Operation {
fn _op_net(_o: &OperationSeq) -> Operation {
todo!()
}
@ -45,7 +45,7 @@ fn op_net(_o: &OperationSeq) -> Operation {
async fn buffer_worker(
bv: BufferView,
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>,
) {
let mut queue: VecDeque<Operation> = VecDeque::new();
@ -67,7 +67,7 @@ async fn buffer_worker(
},
server_op = rx_core.recv() => {
if let Ok(oop) = server_op {
if let Ok(_oop) = server_op {
let mut send_op = true;
for (i, _op) in queue.iter().enumerate() {
if true { // TODO must compare underlying OperationSeq here! (op.equals(server_op))

View file

@ -4,7 +4,7 @@ pub mod proto {
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};
@ -14,10 +14,6 @@ use crate::actor::{
use self::proto::session_server::SessionServer;
use super::workspace::WorkspaceExtension;
use uuid::Uuid;
#[derive(Debug)]
pub struct SessionService {
state: Arc<StateManager>,
@ -27,7 +23,7 @@ pub struct SessionService {
impl Session for SessionService {
async fn create_workspace(
&self,
req: Request<WorkspaceBuilderRequest>,
_req: Request<WorkspaceBuilderRequest>,
) -> Result<Response<SessionResponse>, Status> {
// let name = req.extensions().get::<WorkspaceExtension>().unwrap().id.clone();
let w = Workspace::new("im lazy".into());