Skip to content

Commit b6f000d

Browse files
committed
chore: fix cippy
1 parent 2218c73 commit b6f000d

File tree

3 files changed

+11
-20
lines changed

3 files changed

+11
-20
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,7 @@ jobs:
3737
- run: sudo apt update && sudo apt install -y libclang-dev
3838
- name: Run clippy
3939
run: |
40-
cargo clippy --all --tests -- -A clippy::upper-case-acronyms -A clippy::missing_safety_doc -D warnings
41-
42-
audit:
43-
name: Security audit
44-
runs-on: ubuntu-latest
45-
steps:
46-
- uses: actions/checkout@v6
47-
- uses: rustsec/audit-check@v2.0.0
48-
with:
49-
token: ${{ secrets.GITHUB_TOKEN }}
50-
40+
make clippy
5141
5242
valgrind:
5343
name: valgrind

librocksdb-sys/tests/ffi.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
non_upper_case_globals,
2121
unused_mut,
2222
unused_unsafe,
23-
unused_variables
23+
unused_variables,
24+
static_mut_refs
2425
)]
2526

2627
#[macro_use]

src/ops/multi_get.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,22 +192,22 @@ where
192192

193193
pub trait BatchedMultiGetCF<R> {
194194
fn batched_multi_get_cf_full<'a, K, I>(
195-
&self,
195+
&'a self,
196196
cf: &ColumnFamily,
197197
keys: I,
198198
sorted_input: bool,
199199
readopts: Option<&R>,
200-
) -> Vec<Result<Option<DBPinnableSlice>, Error>>
200+
) -> Vec<Result<Option<DBPinnableSlice<'a>>, Error>>
201201
where
202202
K: AsRef<[u8]> + 'a + ?Sized,
203203
I: IntoIterator<Item = &'a K>;
204204

205205
fn batched_multi_get_cf<'a, K, I>(
206-
&self,
206+
&'a self,
207207
cf: &ColumnFamily,
208208
keys: I,
209209
sorted_input: bool,
210-
) -> Vec<Result<Option<DBPinnableSlice>, Error>>
210+
) -> Vec<Result<Option<DBPinnableSlice<'a>>, Error>>
211211
where
212212
K: AsRef<[u8]> + 'a + ?Sized,
213213
I: IntoIterator<Item = &'a K>,
@@ -216,12 +216,12 @@ pub trait BatchedMultiGetCF<R> {
216216
}
217217

218218
fn batched_multi_get_cf_opt<'a, K, I>(
219-
&self,
219+
&'a self,
220220
cf: &ColumnFamily,
221221
keys: I,
222222
sorted_input: bool,
223223
readopts: &R,
224-
) -> Vec<Result<Option<DBPinnableSlice>, Error>>
224+
) -> Vec<Result<Option<DBPinnableSlice<'a>>, Error>>
225225
where
226226
K: AsRef<[u8]> + 'a + ?Sized,
227227
I: IntoIterator<Item = &'a K>,
@@ -235,12 +235,12 @@ where
235235
T: Handle<ffi::rocksdb_t> + super::Read,
236236
{
237237
fn batched_multi_get_cf_full<'a, K, I>(
238-
&self,
238+
&'a self,
239239
cf: &ColumnFamily,
240240
keys: I,
241241
sorted_input: bool,
242242
readopts: Option<&ReadOptions>,
243-
) -> Vec<Result<Option<DBPinnableSlice>, Error>>
243+
) -> Vec<Result<Option<DBPinnableSlice<'a>>, Error>>
244244
where
245245
K: AsRef<[u8]> + 'a + ?Sized,
246246
I: IntoIterator<Item = &'a K>,

0 commit comments

Comments
 (0)