Skip to content

Commit

Permalink
Fix CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
langyo committed May 16, 2024
1 parent a7d1350 commit d148fcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/yew-macro/src/html_tree/lint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use crate::props::{ElementProps, Prop};
/// Lints HTML elements to check if they are well formed. If the element is not well-formed, then
/// use `proc-macro-error` (and the `emit_warning!` macro) to produce a warning. At present, these
/// are only emitted on nightly.
#[allow(dead_code)]
pub trait Lint {
fn lint(element: &HtmlElement);
}
Expand Down
7 changes: 4 additions & 3 deletions packages/yew/src/html/classes.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::borrow::Cow;
use std::fmt::Display;
use std::iter::FromIterator;
use std::rc::Rc;

Expand Down Expand Up @@ -165,14 +166,14 @@ impl IntoIterator for &Classes {
}
}

impl ToString for Classes {
fn to_string(&self) -> String {
impl Display for Classes {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut iter = self.set.iter().cloned();

iter.next()
.map(|first| build_attr_value(first, iter))
.unwrap_or_default()
.to_string()
.fmt(f)
}
}

Expand Down

0 comments on commit d148fcb

Please sign in to comment.