Skip to content

Commit bede013

Browse files
committed
Clippy fixes
1 parent d554293 commit bede013

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn process(buf: &mut String, file: &Path, name: &str, desc: &str) {
7979

8080
write!(buf, "#[doc = {desc:?}] pub const {name}: Module = ").unwrap();
8181
encode(buf, &module);
82-
buf.push_str(";");
82+
buf.push(';');
8383
}
8484

8585
/// Tokenizes and classifies a line.
@@ -165,7 +165,7 @@ fn parse<'a>(
165165
p.next();
166166
}
167167

168-
let symbol = if variants.len() > 0 {
168+
let symbol = if !variants.is_empty() {
169169
if let Some(c) = c {
170170
variants.insert(0, ("", c));
171171
}
@@ -204,15 +204,15 @@ fn encode(buf: &mut String, module: &Module) {
204204
Def::Module(module) => {
205205
buf.push_str("Def::Module(");
206206
encode(buf, module);
207-
buf.push_str(")");
207+
buf.push(')');
208208
}
209209
Def::Symbol(symbol) => {
210210
buf.push_str("Def::Symbol(Symbol::");
211211
match symbol {
212212
Symbol::Single(c) => write!(buf, "Single({c:?})").unwrap(),
213213
Symbol::Multi(list) => write!(buf, "Multi(&{list:?})").unwrap(),
214214
}
215-
buf.push_str(")");
215+
buf.push(')');
216216
}
217217
}
218218
write!(buf, ", deprecation: {:?} }}),", entry.deprecation).unwrap();

0 commit comments

Comments
 (0)