Skip to content

Commit

Permalink
use new api
Browse files Browse the repository at this point in the history
  • Loading branch information
rambip committed Nov 23, 2023
1 parent 39c8497 commit fae5319
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ use web_sys::{window, MouseEvent};
use std::collections::HashMap;


impl Context<'static> for Props {
impl<'a> Context<'a, 'static> for &'a Props {
type View = Html;

type HtmlCallback<T: 'static> = Callback<T, Html>;

type Handler<T: 'static> = Callback<T>;

type Setter<T> = UseStateHandle<T>;
type Setter<T: 'static> = UseStateHandle<T>;

fn props<'a>(&'a self) -> MarkdownProps<'a, 'static, Self> {
fn props(&'a self) -> MarkdownProps<'a, 'static, Self> {
let Props {
onclick,
render_links,
Expand Down Expand Up @@ -246,5 +246,5 @@ pub struct Props {

#[function_component]
pub fn Markdown(props: &Props) -> Html {
render_markdown(props, &props.src)
render_markdown(&props, &props.src)
}

0 comments on commit fae5319

Please sign in to comment.