mirror of
https://github.com/tweag/nickel.git
synced 2024-08-16 15:10:25 +03:00
Fix clippy 1.75 warnings (#1750)
This commit is contained in:
parent
77b9c5791a
commit
25cba8c21e
@ -102,7 +102,7 @@ impl DocCommand {
|
||||
|
||||
let mut has_file_name = false;
|
||||
|
||||
if let Some(path) = self.input.files.get(0) {
|
||||
if let Some(path) = self.input.files.first() {
|
||||
if let Some(file_stem) = path.file_stem() {
|
||||
output_file.push(file_stem);
|
||||
has_file_name = true;
|
||||
|
@ -106,6 +106,10 @@ impl TermEnvironment for SimpleTermEnvironment {
|
||||
where
|
||||
F: FnOnce(Option<(&RichTerm, &SimpleTermEnvironment)>) -> T,
|
||||
{
|
||||
// See https://github.com/rust-lang/rust-clippy/issues/11764. It's been fixed upstream, but
|
||||
// hasn't landed in a clippy release yet. We can remove the allow(clippy) once it does
|
||||
// land.
|
||||
#[allow(clippy::map_identity)]
|
||||
f(env.0.get(&id).map(|(rt, env)| (rt, env)))
|
||||
}
|
||||
|
||||
|
@ -2106,7 +2106,7 @@ fn infer_with_annot<V: TypecheckVisitor>(
|
||||
},
|
||||
value_opt,
|
||||
) if !contracts.is_empty() => {
|
||||
let ctr = contracts.get(0).unwrap();
|
||||
let ctr = contracts.first().unwrap();
|
||||
let LabeledType { typ: ty2, .. } = ctr;
|
||||
|
||||
let uty2 = UnifType::from_type(ty2.clone(), &ctxt.term_env);
|
||||
|
Loading…
Reference in New Issue
Block a user