remove unneeded .as_ref() calls.
This commit is contained in:
parent
0eb878d2aa
commit
f55b2c9b12
@ -657,7 +657,7 @@ impl EmbargoVisitor<'tcx> {
|
||||
.map(|module_hir_id| self.tcx.hir().expect_item(module_hir_id))
|
||||
{
|
||||
if let hir::ItemKind::Mod(m) = &item.kind {
|
||||
for item_id in m.item_ids.as_ref() {
|
||||
for item_id in m.item_ids {
|
||||
let item = self.tcx.hir().expect_item(item_id.id);
|
||||
let def_id = self.tcx.hir().local_def_id(item_id.id);
|
||||
if !self.tcx.hygienic_eq(segment.ident, item.ident, def_id) {
|
||||
|
@ -239,7 +239,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
|
||||
.segments
|
||||
.iter()
|
||||
.filter_map(|seg| seg.args.as_ref())
|
||||
.map(|generic_args| generic_args.args.as_ref())
|
||||
.map(|generic_args| generic_args.args)
|
||||
.find_map(|args| {
|
||||
args.iter()
|
||||
.filter(|arg| arg.is_const())
|
||||
|
@ -2011,7 +2011,7 @@ impl Path {
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub fn file_name(&self) -> Option<&OsStr> {
|
||||
self.components().next_back().and_then(|p| match p {
|
||||
Component::Normal(p) => Some(p.as_ref()),
|
||||
Component::Normal(p) => Some(p),
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user