Skip to content

Commit 44c7632

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

File tree

339 files changed

+589
-270
lines changed

Some content is hidden

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

339 files changed

+589
-270
lines changed

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)]

gix-chunk/src/file/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
///
2+
#[allow(clippy::empty_docs)]
23
pub mod decode;
34
///
5+
#[allow(clippy::empty_docs)]
46
pub mod index;
57

68
///
9+
#[allow(clippy::empty_docs)]
710
pub mod write;
811

912
/// The offset to a chunk as seen relative to the beginning of the file containing it.

0 commit comments

Comments
 (0)