Unverified Commit 268ee191 authored by Nugine's avatar Nugine
Browse files

lint: clippy::semicolon_if_nothing_returned

parent b57b840a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ pub fn codegen(rust_types: &RustTypes, g: &mut Codegen) {
                    }
                }

                g.ln("}")
                g.ln("}");
            }
            rust::Type::StructEnum(ty) => {
                codegen_doc(ty.doc.as_deref(), g);
@@ -364,7 +364,7 @@ pub fn codegen(rust_types: &RustTypes, g: &mut Codegen) {
                    g.ln(f!("    {}({}),", variant.name, variant.type_));
                }

                g.ln("}")
                g.ln("}");
            }
            rust::Type::Timestamp(ty) => {
                codegen_doc(ty.doc.as_deref(), g);
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ pub fn codegen(model: &smithy::Model, g: &mut Codegen) {
                assert_eq!(status.as_ref().unwrap(), "400 Bad Request");
            }
            for desc in &err.description {
                g.ln(f!("/// + {}", desc.as_ref().unwrap()))
                g.ln(f!("/// + {}", desc.as_ref().unwrap()));
            }
            g.ln("///");
            g.ln("/// HTTP Status Code: 400 Bad Request");
+2 −2
Original line number Diff line number Diff line
@@ -22,10 +22,10 @@ impl Codegen {

impl Codegen {
    pub fn lf(&mut self) {
        writeln!(self.writer).unwrap()
        writeln!(self.writer).unwrap();
    }

    pub fn ln(&mut self, line: impl AsRef<str>) {
        writeln!(self.writer, "{}", line.as_ref()).unwrap()
        writeln!(self.writer, "{}", line.as_ref()).unwrap();
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ pub fn codegen(model: &smithy::Model, g: &mut Codegen) {
            let value = header.to_ascii_lowercase();
            g.ln(f!("pub const {name}: HeaderName = HeaderName::from_static({value:?});",));
        } else {
            g.ln(f!("pub use hyper::header::{name};"))
            g.ln(f!("pub use hyper::header::{name};"));
        }
        g.lf();
    }
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
#![deny(
    clippy::all, //
    clippy::must_use_candidate, //
    clippy::semicolon_if_nothing_returned, //
)]

mod gen;
Loading