mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 05:48:56 +08:00 
			
		
		
		
	Fix clippy warnings
This commit is contained in:
		| @@ -215,10 +215,8 @@ impl VTab for CSVTab { | ||||
|             } else { | ||||
|                 let mut record = csv::ByteRecord::new(); | ||||
|                 if try!(reader.read_byte_record(&mut record)) { | ||||
|                     let mut count = 0; | ||||
|                     for _ in record.iter() { | ||||
|                         cols.push(format!("c{}", count)); | ||||
|                         count += 1; | ||||
|                     for (i, _) in record.iter().enumerate() { | ||||
|                         cols.push(format!("c{}", i)); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
| @@ -249,7 +247,7 @@ impl VTab for CSVTab { | ||||
|  | ||||
|     // Only a forward full table scan is supported. | ||||
|     fn best_index(&self, info: &mut IndexInfo) -> Result<()> { | ||||
|         info.set_estimated_cost(1000000.); | ||||
|         info.set_estimated_cost(1_000_000.); | ||||
|         Ok(()) | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -131,11 +131,11 @@ impl VTab for SeriesTab { | ||||
|         if idx_num.contains(QueryPlanFlags::BOTH) { | ||||
|             // Both start= and stop= boundaries are available. | ||||
|             info.set_estimated_cost( | ||||
|                 (2 - if idx_num.contains(QueryPlanFlags::STEP) { | ||||
|                 f64::from(2 - if idx_num.contains(QueryPlanFlags::STEP) { | ||||
|                     1 | ||||
|                 } else { | ||||
|                     0 | ||||
|                 }) as f64, | ||||
|                 }), | ||||
|             ); | ||||
|             info.set_estimated_rows(1000); | ||||
|             if info.num_of_order_by() == 1 { | ||||
| @@ -145,8 +145,8 @@ impl VTab for SeriesTab { | ||||
|                 info.set_order_by_consumed(true); | ||||
|             } | ||||
|         } else { | ||||
|             info.set_estimated_cost(2147483647f64); | ||||
|             info.set_estimated_rows(2147483647); | ||||
|             info.set_estimated_cost(2_147_483_647f64); | ||||
|             info.set_estimated_rows(2_147_483_647); | ||||
|         } | ||||
|         info.set_idx_num(idx_num.bits()); | ||||
|         Ok(()) | ||||
| @@ -201,7 +201,7 @@ impl VTabCursor for SeriesTabCursor { | ||||
|             self.max_value = try!(args.get(i)); | ||||
|             i += 1; | ||||
|         } else { | ||||
|             self.max_value = 0xffffffff; | ||||
|             self.max_value = 0xffff_ffff; | ||||
|         } | ||||
|         if idx_num.contains(QueryPlanFlags::STEP) { | ||||
|             self.step = try!(args.get(i)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user