Skip to content

Commit 658d2f8

Browse files
committed
Fix clippy::ptr_arg
1 parent 93de5d8 commit 658d2f8

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

chalk-integration/src/lowering.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ impl Lower for Program {
4242

4343
// Make a vector mapping each thing in `items` to an id,
4444
// based just on its position:
45-
let raw_ids = self.items.iter().map(|_| lowerer.next_item_id()).collect();
45+
let raw_ids = self
46+
.items
47+
.iter()
48+
.map(|_| lowerer.next_item_id())
49+
.collect::<Vec<_>>();
4650

4751
lowerer.extract_associated_types(self, &raw_ids)?;
4852
lowerer.extract_ids(self, &raw_ids)?;

chalk-integration/src/lowering/program_lowerer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl ProgramLowerer {
5353
pub fn extract_associated_types(
5454
&mut self,
5555
program: &Program,
56-
raw_ids: &Vec<RawId>,
56+
raw_ids: &[RawId],
5757
) -> LowerResult<()> {
5858
for (item, &raw_id) in program.items.iter().zip(raw_ids) {
5959
match item {
@@ -86,7 +86,7 @@ impl ProgramLowerer {
8686
Ok(())
8787
}
8888

89-
pub fn extract_ids(&mut self, program: &Program, raw_ids: &Vec<RawId>) -> LowerResult<()> {
89+
pub fn extract_ids(&mut self, program: &Program, raw_ids: &[RawId]) -> LowerResult<()> {
9090
for (item, &raw_id) in program.items.iter().zip(raw_ids) {
9191
match item {
9292
Item::AdtDefn(defn) => {
@@ -140,7 +140,7 @@ impl ProgramLowerer {
140140
Ok(())
141141
}
142142

143-
pub fn lower(self, program: &Program, raw_ids: &Vec<RawId>) -> LowerResult<LoweredProgram> {
143+
pub fn lower(self, program: &Program, raw_ids: &[RawId]) -> LowerResult<LoweredProgram> {
144144
let mut adt_data = BTreeMap::new();
145145
let mut adt_reprs = BTreeMap::new();
146146
let mut adt_variances = BTreeMap::new();

0 commit comments

Comments
 (0)