diff --git a/src/api/controller.rs b/src/api/controller.rs index 18e5136..12ed35e 100644 --- a/src/api/controller.rs +++ b/src/api/controller.rs @@ -25,14 +25,11 @@ pub(crate) trait ControllerWorker { /// * if async is not feasible a [Controller::poll]/[Controller::try_recv] approach is possible #[async_trait::async_trait] pub trait Controller : Sized + Send + Sync { - /// type of upstream values, used in [Self::send] - type Input; - /// enqueue a new value to be sent to all other users /// /// success or failure of this function does not imply validity of sent operation, /// because it's integrated asynchronously on the background worker - fn send(&self, x: Self::Input) -> Result<()>; + fn send(&self, x: T) -> Result<()>; /// get next value from other users, blocking until one is available /// diff --git a/src/buffer/controller.rs b/src/buffer/controller.rs index 129f492..21dca71 100644 --- a/src/buffer/controller.rs +++ b/src/buffer/controller.rs @@ -77,8 +77,6 @@ impl Drop for StopOnDrop { #[async_trait] impl Controller for BufferController { - type Input = TextChange; - /// block until a text change is available /// this returns immediately if one is already available async fn poll(&self) -> crate::Result<()> { diff --git a/src/cursor/controller.rs b/src/cursor/controller.rs index 320871a..3f579d1 100644 --- a/src/cursor/controller.rs +++ b/src/cursor/controller.rs @@ -67,8 +67,6 @@ impl CursorController { #[async_trait] impl Controller for CursorController { - type Input = Cursor; - /// enqueue a cursor event to be broadcast to current workspace /// will automatically invert cursor start/end if they are inverted fn send(&self, mut cursor: Cursor) -> crate::Result<()> {