mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 05:48:56 +08:00 
			
		
		
		
	Merge remote-tracking branch 'upstream/master' into db_path
This commit is contained in:
		| @@ -75,13 +75,10 @@ impl Session<'_> { | |||||||
|                 let c_slice = CStr::from_ptr(tbl_str).to_bytes(); |                 let c_slice = CStr::from_ptr(tbl_str).to_bytes(); | ||||||
|                 str::from_utf8(c_slice) |                 str::from_utf8(c_slice) | ||||||
|             }; |             }; | ||||||
|             if let Ok(true) = |             c_int::from( | ||||||
|                 catch_unwind(|| (*boxed_filter)(tbl_name.expect("non-utf8 table name"))) |                 catch_unwind(|| (*boxed_filter)(tbl_name.expect("non-utf8 table name"))) | ||||||
|             { |                     .unwrap_or_default(), | ||||||
|                 1 |             ) | ||||||
|             } else { |  | ||||||
|                 0 |  | ||||||
|             } |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         match filter { |         match filter { | ||||||
| @@ -193,7 +190,7 @@ impl Session<'_> { | |||||||
|     #[inline] |     #[inline] | ||||||
|     pub fn set_enabled(&mut self, enabled: bool) { |     pub fn set_enabled(&mut self, enabled: bool) { | ||||||
|         unsafe { |         unsafe { | ||||||
|             ffi::sqlite3session_enable(self.s, if enabled { 1 } else { 0 }); |             ffi::sqlite3session_enable(self.s, c_int::from(enabled)); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -207,7 +204,7 @@ impl Session<'_> { | |||||||
|     #[inline] |     #[inline] | ||||||
|     pub fn set_indirect(&mut self, indirect: bool) { |     pub fn set_indirect(&mut self, indirect: bool) { | ||||||
|         unsafe { |         unsafe { | ||||||
|             ffi::sqlite3session_indirect(self.s, if indirect { 1 } else { 0 }); |             ffi::sqlite3session_indirect(self.s, c_int::from(indirect)); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -708,13 +705,9 @@ where | |||||||
|         str::from_utf8(c_slice) |         str::from_utf8(c_slice) | ||||||
|     }; |     }; | ||||||
|     match *tuple { |     match *tuple { | ||||||
|         (Some(ref filter), _) => { |         (Some(ref filter), _) => c_int::from( | ||||||
|             if let Ok(true) = catch_unwind(|| filter(tbl_name.expect("illegal table name"))) { |             catch_unwind(|| filter(tbl_name.expect("illegal table name"))).unwrap_or_default(), | ||||||
|                 1 |         ), | ||||||
|             } else { |  | ||||||
|                 0 |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         _ => unimplemented!(), |         _ => unimplemented!(), | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -115,7 +115,7 @@ unsafe impl<'vtab> VTab<'vtab> for SeriesTab { | |||||||
|         } |         } | ||||||
|         if idx_num.contains(QueryPlanFlags::BOTH) { |         if idx_num.contains(QueryPlanFlags::BOTH) { | ||||||
|             // Both start= and stop= boundaries are available. |             // Both start= and stop= boundaries are available. | ||||||
|             //#[allow(clippy::bool_to_int_with_if)] |             #[allow(clippy::bool_to_int_with_if)] | ||||||
|             info.set_estimated_cost(f64::from( |             info.set_estimated_cost(f64::from( | ||||||
|                 2 - if idx_num.contains(QueryPlanFlags::STEP) { |                 2 - if idx_num.contains(QueryPlanFlags::STEP) { | ||||||
|                     1 |                     1 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user