Skip to content

Commit

Permalink
Merge pull request #127 from vbrandl/fix/clippy-pedantic-warnings
Browse files Browse the repository at this point in the history
Fix or suppress pedantic clippy warnings
  • Loading branch information
kaj committed Jul 16, 2023
2 parents 93ce946 + bb6c042 commit c36dd93
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/staticfiles.rs
Expand Up @@ -238,6 +238,7 @@ pub struct StaticFile {
#[allow(dead_code)]
impl StaticFile {
/// Get a single `StaticFile` by name, if it exists.
#[must_use]
pub fn get(name: &str) -> Option<&'static Self> {
if let Ok(pos) = STATICS.binary_search_by_key(&name, |s| s.name) {
Some(STATICS[pos])
Expand Down
1 change: 1 addition & 0 deletions src/template.rs
Expand Up @@ -41,6 +41,7 @@ impl Template {
writeln!(
out,
"\n\
#[allow(clippy::used_underscore_binding)]\n
pub fn {name}<{ta}{ta_sep}W>(#[allow(unused_mut)] mut _ructe_out_: W{args}) -> io::Result<()>\n\
where W: Write {{\n\
{body}\
Expand Down
2 changes: 1 addition & 1 deletion src/templateexpression.rs
Expand Up @@ -59,7 +59,7 @@ impl Display for TemplateArgument {
}
TemplateArgument::Body(ref v) => writeln!(
out,
"|mut _ructe_out_| {{\n{}\nOk(())\n}}",
"#[allow(clippy::used_underscore_binding)] |mut _ructe_out_| {{\n{}\nOk(())\n}}",
v.iter().map(|b| b.code()).format(""),
),
}
Expand Down

0 comments on commit c36dd93

Please sign in to comment.