RibirX / Ribir

Non-intrusive GUI framework for Rust

Home Page:https://ribir.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StateWriter method `clone_writer` OriginWriter and OriginReader type signature need annote

sologeek opened this issue · comments

fn w_parent<S>(msg: S) -> impl WidgetBuilder
where
  S: StateWriter<Value = Msg>,
  S::OriginWriter: StateWriter<Value = Channel>,
{
  w_child(msg.clone_writer())
}
fn w_child<S>(msg: S) -> impl WidgetBuilder
where
  S: StateWriter<Value = Msg>,
  S::OriginWriter: StateWriter<Value = Channel>,
{
}
type mismatch resolving `<<<S as StateWriter>::Writer as StateWriter>::OriginWriter as StateReader>::Value == Channel`
      expected struct `Channel`
found associated type `<<<S as ribir::prelude::StateWriter>::Writer as ribir::prelude::StateWriter>::OriginWriter as ribir::prelude::StateReader>::Value`
consider constraining the associated type `<<<S as ribir::prelude::StateWriter>::Writer as ribir::prelude::StateWriter>::OriginWriter as ribir::prelude::StateReader>::Value` to `Channel`