Skip to content

Commit 90c894b

Browse files
committed
Some clippy fixes.
1 parent 1ec415b commit 90c894b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/simple/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ mod models {
158158
pub name: &'a str,
159159
pub email: &'a str,
160160
}
161-
impl<'a> User<'a> {
161+
impl User<'_> {
162162
pub fn mailto(&self) -> Html<String> {
163163
Html(format!("<a href=\"mailto:{0}\">{0}</a>", self.email))
164164
}
165165
}
166-
impl<'a> fmt::Display for User<'a> {
166+
impl fmt::Display for User<'_> {
167167
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
168168
f.write_str(self.name)
169169
}

src/staticfiles.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl StaticFile {
429429
FormalArgs::new(vec![("name".into(), None)]),
430430
Arc::new(move |s| {
431431
let name: String = s.get("name".into())?;
432-
let rname = name.replace('-', "_").replace('.', "_");
432+
let rname = name.replace(['-', '.'], "_");
433433
existing_statics
434434
.iter()
435435
.find(|(n, _v)| *n == &rname)
@@ -446,7 +446,7 @@ impl StaticFile {
446446
);
447447

448448
let css = context.transform(scss)?;
449-
self.add_file_data(&src.with_extension("css"), &css)
449+
self.add_file_data(src.with_extension("css"), &css)
450450
}
451451

452452
fn add_static(

0 commit comments

Comments
 (0)