Skip to content

Commit f8ce3d0

Browse files
committed
fix lints for nightly, and clippy
1 parent 61c002b commit f8ce3d0

File tree

342 files changed

+606
-290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

342 files changed

+606
-290
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ jobs:
4747
test:
4848
runs-on: ubuntu-latest
4949
steps:
50-
- uses: actions/checkout@v3
51-
- uses: dtolnay/rust-toolchain@stable
52-
- uses: Swatinem/rust-cache@v2
53-
- name: Setup dependencies
54-
run:
55-
sudo apt-get install tree
56-
- uses: extractions/setup-just@v1
57-
- name: test
58-
env:
59-
CI: true
60-
GITOXIDE_TEST_IGNORE_ARCHIVES: 1
61-
run: just ci-test
50+
- uses: actions/checkout@v3
51+
- uses: dtolnay/rust-toolchain@stable
52+
- uses: Swatinem/rust-cache@v2
53+
- name: Setup dependencies
54+
run:
55+
sudo apt-get install tree
56+
- uses: extractions/setup-just@v1
57+
- name: test
58+
env:
59+
CI: true
60+
GITOXIDE_TEST_IGNORE_ARCHIVES: 1
61+
run: just ci-test
6262

6363
test-fast:
6464
strategy:
@@ -163,7 +163,7 @@ jobs:
163163
components: clippy,rustfmt
164164
- uses: extractions/setup-just@v1
165165
- name: Run cargo clippy
166-
run: just clippy -D warnings
166+
run: just clippy -D warnings -A unknown-lints
167167
- name: Run cargo doc
168168
run: just doc
169169
- name: Run cargo fmt
@@ -189,10 +189,10 @@ jobs:
189189
continue-on-error: ${{ matrix.checks == 'advisories' }}
190190

191191
steps:
192-
- uses: actions/checkout@v3
193-
- uses: EmbarkStudios/cargo-deny-action@v1
194-
with:
195-
command: check ${{ matrix.checks }}
192+
- uses: actions/checkout@v3
193+
- uses: EmbarkStudios/cargo-deny-action@v1
194+
with:
195+
command: check ${{ matrix.checks }}
196196
wasm:
197197
name: WebAssembly
198198
runs-on: ubuntu-latest

gitoxide-core/src/repository/credential.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::convert::TryInto;
2-
31
#[derive(Debug, thiserror::Error)]
42
enum Error {
53
#[error(transparent)]

gix-actor/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use gix_date::Time;
2222

2323
mod identity;
2424
///
25+
#[allow(clippy::empty_docs)]
2526
pub mod signature;
2627

2728
/// A person with name and email.

gix-actor/src/signature/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,6 @@ pub(crate) mod write {
129129
}
130130

131131
///
132+
#[allow(clippy::empty_docs)]
132133
pub mod decode;
133134
pub use decode::function::decode;

gix-attributes/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ use kstring::{KString, KStringRef};
1313

1414
mod assignment;
1515
///
16+
#[allow(clippy::empty_docs)]
1617
pub mod name;
1718
///
19+
#[allow(clippy::empty_docs)]
1820
pub mod state;
1921

2022
///
23+
#[allow(clippy::empty_docs)]
2124
pub mod search;
2225

2326
///
27+
#[allow(clippy::empty_docs)]
2428
pub mod parse;
2529

2630
/// Parse attribute assignments line by line from `bytes`, and fail the operation on error.

gix-attributes/src/search/outcome.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl Outcome {
2626
for (order, macro_attributes) in collection.iter().filter_map(|(_, meta)| {
2727
(!meta.macro_attributes.is_empty()).then_some((meta.id.0, &meta.macro_attributes))
2828
}) {
29-
self.matches_by_id[order].macro_attributes = macro_attributes.clone()
29+
self.matches_by_id[order].macro_attributes.clone_from(macro_attributes)
3030
}
3131

3232
for (name, id) in self.selected.iter_mut().filter(|(_, id)| id.is_none()) {
@@ -88,7 +88,7 @@ impl Outcome {
8888
/// Note that it's safe to call it multiple times, so that it can be called after this instance was used to store a search result.
8989
pub fn copy_into(&self, collection: &MetadataCollection, dest: &mut Self) {
9090
dest.initialize(collection);
91-
dest.matches_by_id = self.matches_by_id.clone();
91+
dest.matches_by_id.clone_from(&self.matches_by_id);
9292
if dest.patterns.len() != self.patterns.len() {
9393
dest.patterns = self.patterns.clone();
9494
}
@@ -325,7 +325,11 @@ impl MetadataCollection {
325325
};
326326

327327
self.assign_order_to_attributes(attrs);
328-
self.name_to_meta.get_mut(name).expect("just added").macro_attributes = attrs.clone();
328+
self.name_to_meta
329+
.get_mut(name)
330+
.expect("just added")
331+
.macro_attributes
332+
.clone_from(attrs);
329333

330334
order
331335
}

gix-bitmap/src/ewah.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use std::convert::TryInto;
2-
31
///
2+
#[allow(clippy::empty_docs)]
43
pub mod decode {
54
/// The error returned by [`decode()`][super::decode()].
65
#[derive(Debug, thiserror::Error)]
@@ -52,8 +51,6 @@ pub fn decode(data: &[u8]) -> Result<(Vec, &[u8]), decode::Error> {
5251
}
5352

5453
mod access {
55-
use std::convert::{TryFrom, TryInto};
56-
5754
use super::Vec;
5855

5956
impl Vec {

gix-bitmap/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
pub mod ewah;
88

99
pub(crate) mod decode {
10-
use std::convert::TryInto;
11-
1210
#[inline]
1311
pub(crate) fn split_at_pos(data: &[u8], pos: usize) -> Option<(&[u8], &[u8])> {
1412
if data.len() < pos {

gix-chunk/src/file/decode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{convert::TryInto, ops::Range};
1+
use std::ops::Range;
22

33
mod error {
44
/// The value returned by [`crate::file::Index::from_bytes()`]

gix-chunk/src/file/index.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::ops::Range;
33
use crate::file::Index;
44

55
///
6+
#[allow(clippy::empty_docs)]
67
pub mod offset_by_kind {
78
use std::fmt::{Display, Formatter};
89

@@ -27,6 +28,7 @@ pub mod offset_by_kind {
2728
}
2829

2930
///
31+
#[allow(clippy::empty_docs)]
3032
pub mod data_by_kind {
3133
/// The error returned by [`Index::data_by_id()`][super::Index::data_by_id()].
3234
#[derive(Debug, thiserror::Error)]

0 commit comments

Comments
 (0)