clippy fixes

This commit is contained in:
Robin Appelman 2023-12-29 17:09:11 +01:00
commit 2f81852da1
7 changed files with 18 additions and 18 deletions

View file

@ -17,7 +17,7 @@ pub struct DemoListScript;
impl<'a> Index<'a> {
fn map_list(&self) -> impl Render + 'a {
MapList(&self.maps)
MapList(self.maps)
}
fn demo_list(&self) -> impl Render + 'a {
DemoList { demos: self.demos }
@ -61,9 +61,9 @@ impl Render for MapList<'_> {
let mut first = true;
for map in self.0 {
if !first {
buffer.push_str(",");
buffer.push(',');
}
buffer.push_str(&map);
buffer.push_str(map);
first = false;
}
}

View file

@ -44,7 +44,7 @@ impl Render for PluginSection<'_> {
code { "/tf/addons/sourcemod/plugins/" }
" on your server."
}
@if let None = self.key {
@if self.key.is_none() {
li {
"Login to retrieve your api-key."
}

View file

@ -16,7 +16,7 @@ pub struct Profile<'a> {
impl<'a> Profile<'a> {
fn map_list(&self) -> impl Render + 'a {
MapList(&self.maps)
MapList(self.maps)
}
fn demo_list(&self) -> impl Render + 'a {
DemoList { demos: self.demos }

View file

@ -16,7 +16,7 @@ pub struct Uploads<'a> {
impl<'a> Uploads<'a> {
fn map_list(&self) -> impl Render + 'a {
MapList(&self.maps)
MapList(self.maps)
}
fn demo_list(&self) -> impl Render + 'a {
DemoList { demos: self.demos }