Skip to content

Commit

Permalink
Ran missing formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusAdam committed Jul 26, 2023
1 parent e2d6d14 commit 4011798
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::process::Command;
extern crate chrono;
use std::env;

const COMPILER_DEPENDENT_BINARIES : &[&str] = &["dfpp", "cargo-dfpp", "dfpp-explorer"];
const COMPILER_DEPENDENT_BINARIES: &[&str] = &["dfpp", "cargo-dfpp", "dfpp-explorer"];

fn add_link_arg_for_compiler_binaries(s: impl std::fmt::Display) {
for bin in COMPILER_DEPENDENT_BINARIES {
Expand Down
13 changes: 7 additions & 6 deletions src/discover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use hir::{
};
use rustc_middle::hir::nested_filter::OnlyBodies;
use rustc_span::{symbol::Ident, Span, Symbol};
use std::{cell::RefCell, rc::Rc, collections::hash_map::Entry};
use std::{cell::RefCell, collections::hash_map::Entry, rc::Rc};

/// Values of this type can be matched against Rust attributes
pub type AttrMatchT = Vec<Symbol>;
Expand Down Expand Up @@ -302,7 +302,6 @@ impl<'tcx> intravisit::Visitor<'tcx> for CollectingVisitor<'tcx> {
return;
}


let node = self.tcx.hir().find(id).unwrap();

if let Some((def_id, obj_type, allow_prior)) = if let Some(decl) = node.fn_decl() {
Expand All @@ -324,9 +323,11 @@ impl<'tcx> intravisit::Visitor<'tcx> for CollectingVisitor<'tcx> {
| hir::Node::Ctor(hir::VariantData::Unit(..)) => {
Some((id.expect_owner().def_id, ObjectType::Type, false))
}
hir::Node::Ctor(hir::VariantData::Tuple(_, _, _)) => {
Some((self.tcx.hir().parent_id(id).expect_owner().def_id, ObjectType::Type, true))
}
hir::Node::Ctor(hir::VariantData::Tuple(_, _, _)) => Some((
self.tcx.hir().parent_id(id).expect_owner().def_id,
ObjectType::Type,
true,
)),
_ => None,
}
} {
Expand All @@ -339,7 +340,7 @@ impl<'tcx> intravisit::Visitor<'tcx> for CollectingVisitor<'tcx> {
}
Entry::Vacant(vac) => {
vac.insert(val);
},
}
}
} else {
let e = match node {
Expand Down

0 comments on commit 4011798

Please sign in to comment.